Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to create expression with 2 types of dimension in same bar chart?

Hi ALL

I have the below expression which is working fine for each line of data I have. It compares QTY_STOCK for previous day with current day and then it counts the distinct number of POC_CODE as shown below:

(
count({$<Date={">=$(=max(Date)-1)<$(=Date)"}, Pivot_Item_Type = {'SUBST'}, Z_Active_For_Ava = {1}>} Distinct aggr(if( sum({$<Date={">=$(=max(Date)-1)<$(=Date)"},Pivot_Item_Type = {'SUBST'}, Z_Active_For_Ava = {1}>}QTY_STOCK) = 0,POC_CODE,null()), POC_CODE, SUBSTITUTION_ITEM))
/
Count({<Z_Active_For_Ava = {1}, Pivot_Item_Type = {'SUBST'}>}DISTINCT POC_CODE)
)

For my next requirement, I need to apply the same expression in a bar chart with Dimension = Date but as you can see Date is already present as a condition in the above expression.

That is in the bar chart graph I have to show the above expression results for the current selected Date and also for the past 45 days.

But as Date is already present in the above expression, how do I modify it to show the expression for the selected Date and for the past 45 days?

That is how do i include the following in my expression: <Date={">=$(=Date(max(Date)-45))<=$(=max(Date))"} >

Thanks for your help

1 Reply
sunny_talwar