Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikuser22
Creator II
Creator II

Sum expression in bar chart with multiple dimensions

Hi

 

I have a bar chart which represents billing details. It consists of both positive and negative values which is stored in a dimension called Value_Type. Now if I use a filter to select Positive, then there is no change in the bar chart. I can see both positive and negative value. 

If I select Value_Type = Positive, then only positive billing should be seen in the bar chart and vice versa. 

The expression I used is,

Positive:

Sum({$<StoreID={"FO*"},Value_Type={'POSITIVE'}>}Sales)

Negative:

Sum({$<StoreID={"FO*"},Value_Type={'NEGATIVE'}>}Sales)

The expression is working perfectly but it doesn't display only Negative values when the Value_Tyype filter is used. 

 

Br,

Nisha

Thanks in advance

Labels (1)
4 Replies
anat
Master
Master

can you try conditional expression 

if(GetFieldSelections( Value_Type)='POSITIVE',Sum({$<StoreID={"FO*"},Value_Type={'POSITIVE'}>}Sales),Sum({$<StoreID={"FO*"},Value_Type={'NEGATIVE'}>}Sales))

 

qlikuser22
Creator II
Creator II
Author

Thanks for your reply. Unfortunately it is not working. I can see only negative values in bar chart.

anat
Master
Master

if possible can u share sample data

qlikuser22
Creator II
Creator II
Author

Hi @anat  

I am sharing a sample data here

qlikuser22_0-1643358379396.png

The vertical stacked bar chart with dimension as City and Measures as Positive and Negative value with respect to sales. 

Thanks for your help. 

 

Br

Nisha