QlikView Set Analysis with Calculated Values

Qlik Technical Article

Article sections

    Summary: Instructions on how to use set analysis in QlikView to control the analysis required.
    Article Type: Information / Troubleshooting / Support
    Related Product(s): This article relates to the following products:

    • QlikView

    Set Analysis

    The use of set analysis within QlikView documents to ignore selections or enforce specific known selections is highly effective in controlling the analysis required. With the introduction of indirect set analysis, a means of avoiding hardcoding lists which had the potential to change is feasible.

    Another capacity of set analysis, which was already available, is to calculate the values to be used within a set. Below is an example of when this may be useful and how to accomplish.

    Scenario

    In some situations, the values for the set could change relative to current time or cannot be specified in advance as they are to be determined by the user. There may be a calculation which must include all dates beyond a certain point or within a specific range. For set analysis to calculate the values within the set, we need to capture the boundary values as variables.

    In the scenario where the values that are relative to time then variables could be determined at the time of reload and where it is user dependent, input fields can be added to a document. The input fields would be linked to variables so as the user sets the values they are recorded for use within an expression.

    In this example, we are providing the user with two input boxes where the outer limits of the range can be manually set rather than providing a date field for users to select all days of interest, something which could be difficult to manage if the list is long.

    Set Analysis with Calculated Values in QlikView

    The expression used:

    sum({1<SalesOrderDate = {“>=$(varFromDate) <=$(varToDate)”}>}LineSalesAmount)

    This is a combination of a couple of techniques outlined within the QlikView Desktop Help file on Set Analysis.

    For more QlikView information, please visit our product pages.  For more support and troubleshooting, please visit the QlikView Technical Support section of the QGate Knowledgebase.

    Related Information:
    in QlikviewSupportTroubleshooting
    Share This Post
    More To Explore

    Sign Up To Our Newsletter For Monthly Updates And News