Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Dimension value in set expression

Is there a way to get the value of dimension to be used in set analysis without using if statement?

4 Replies
swuehl
MVP
MVP

No, a set expression will be evaluated once per chart, not per dimension line, so there is no chart dimension awareness.

jonathandienst
Partner - Champion III
Partner - Champion III

If you are planning to use a set expression in a chart or table for a row-by-row comparison, then that will not work. Set expressions are evaluated once for the chart/table  and have no knowledge of the dimensions.

You can use a sum(if()) structure to access the dimension values on a row by row basis if your data set is not too big. This type of expression can perform poorly on large data sets. In this case, it is better to add flag fields in the load expression and use these flag fields in a set analysis expression.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

This is what I was showing: The user was selecting a month Year and following measure was shown:

count({<[Account Start Date]={"<$(vCurrentMonthStartABC)"},[Account End Date]={">=$(vCurrentMonthStartABC)"},[Account BU]={'ETS'}>})


Now, they want to see this for all month years irrespective of selection.

So, I would need to know the MonthYear (from dimension) so that I can calculate the month start date to use it in the above expression. Is there a way to do this?

JuanManuelLopezFelizzola
Contributor III
Contributor III

You could use a pick match combination in conjunction with the Only(Dimension) 

Juan Manuel Lopez Felizzola