In our last blog we showed how to use a Qlikview variable inside set analysis. We will replicate a similar scenario but this time, instead of using a variable, we will use an expression to first get the maximum date and then use that maximum date to restrict the set analysis expression to the maximum date

In set analysis, the maximum date expression needs to be evoluated first before the rest of expression is evaulated. We will use a dollar($) sign to achieve that. In Qlikview, this is called dollar sign expansion. Suppose that our normal charts looks like this



Suppose that our requirement is that we need to restrict the chart to whatever the maximum date we have available in the database. We can use the below set analysis expression to achieve this


sum({<prod_date = {"$(=date(max(prod_date)))"}>}Qty)


the expression $(=) is called dollar sign expansion. This will evaulate the expression inside the dollar before the rest of the expression is evaluated. The result is that we get the set analysis for the max date which is calculated inside the set analysis.



If you have any question related to this article, please ask in the comment section below



Published in Qlikview