Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
shahafei2
Creator
Creator

Pick match with aggr in bar chart

Hi everyone,

 

I'm trying to compare calculated forecast data and current data in a bar chart

In order to see a similar chart to:

clipboard_image_0.png

 

I'm using:

 

Dimension = Weekday(Date)

 Expressions 

                 -QTY = (sum({<Inv_Type={'1'}>}[Qty])+SUM(DISTINCT{<Inv_Type={'2'}>}Qty2))/count(distinct week(Date))

 

                 -QTY *=pick(match(Inv_Type,'1','2'),
Ceil(
SUM(AGGR(
pick(match([M.customer group],'A','B','C','D'),
SUM(Qty)*(1+$(v_Factor_A)),
SUM(Qty)*(1+$(v_Factor_B)),
SUM(Qty)*(1+$(v_Factor_C)),
SUM(Qty)*(1+$(v_Factor_D)),
),[M.customer group],Inv_Type,WeekDay(Date)))
,1),
Ceil(
SUM(AGGR(
pick(match([M.customer group],'A','B','C','D'),
SUM(Qty2)*(1+$(v_Factor_A)),
SUM(Qty2)*(1+$(v_Factor_B)),
SUM(Qty2)*(1+$(v_Factor_C)),
SUM(Qty2)*(1+$(v_Factor_D)),
),[M.customer group],Inv_Type,weekday(Date)))
,1))

 

But for some reason, the Qty* calculation is not shown

any ideas?

 

clipboard_image_1.png

 

**The qty expression is presented only**

 

3 Replies
Gysbert_Wassenaar

Please post a small Qlik Sense apps that demonstrates the problem.

talk is cheap, supply exceeds demand
sunny_talwar

Have you added Inv_Type as one of the dimensions in your chart?

shahafei2
Creator
Creator
Author

The result should be the daily summary of the inv_type (contains the growth factor)

in comparison with the current daily summary

 

For my understanding, if I will add the "inv_type" as dimension I won't be able to group the daily summery and to keep the comparison on the same time 

 

am i wrong?