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

Bar chart with 3 differents expressions/bars

Hello,

I want to do a bar chart with 3 bars per year (like : All Sales, Sales for 3 departements and Sales for 5 departements) and 2 dimensions (Years and months).

My problem is with the expression. I have 3 differents expressions for the 3 bars. I don't know how to write my selection in the expression.

Like : Sum( [Sales] & [where departement = (X, Y, Z)] & [where year ='1998 & 1997'] )

If you have any advice or website to give me, please don't hesitate.

Tks for your help.

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi,


This should work

Sum({< Department = {'X', 'Y', 'Z'}, Year = {1997, 1998} >} [Sales])

Hope that helps.

Miguel

View solution in original post

3 Replies
Miguel_Angel_Baeyens

Hi,


This should work

Sum({< Department = {'X', 'Y', 'Z'}, Year = {1997, 1998} >} [Sales])

Hope that helps.

Miguel

MayilVahanan

HI,

     Try like this,

     =Sum({< Year={'1998',1997'}>}Sales)

     =Sum({<Departements = {'1','2','3'}, Year={'1998',1997'}>}Sales)

    

     =Sum({<Departements = {'1','2','3','4',5'}, Year={'1998',1997'}>}Sales)

     Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

It works !

Thank you for your help and your efficacy !