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

qliksense conditional dimension

How to write qliksense conditional dimension:

I have a variable name "trend_date" which has 3 values 

1) 6Mon     2) YTD   3) 13 Mon Rolling

this variable is dynamic based on user selection of this one will be selected and by default it is "6 Mon"

now I have a combo chart where I have a date_month field which set the date in the chart...NOw I want is whatever the value is there in trend_date variable based on that dimension should be selected.

suppose if variable has "6 Mon" value then my date_month should pick 6 month date range only if value is YTD then accordingly and so on

What will be my conditional expression can anyone tell, please.?

1 Reply
AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Hello,

You can handle this with Set Analysis in expression. Pick the expression as per the selection in trend_date field variable

E.g 

Pick(Match(trend_date,'6Mon','YTD','13 Mon Rolling'),

Sum({<Set for 6 months>}Sales),

Sum({<Set for YTD>}Sales),

Sum({<Set for 13 months Rolling>}Sales)

)

Use below post for set analysis.

https://community.qlik.com/t5/QlikView-Documents/Date-Level-Analysis-WTD-MTD-QTD-YTD-Current-Year-Pr...

 

Thanks,

Ashutosh