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: 
evansabres
Specialist
Specialist

WHERE CLAUSE in an Expression

Hello -

I would like to create a chart (probably a stacked column) with the total for three separate groups.

I have a dimension [Major Group] that has several items within that dimension (Food, Beer, Wine) My other dimension is called [Sales Total]

I would like to either do an expression such as [Sales Total] Where([Major Group=Beer]) either in my script or in the chart, but I can't seem to get the correct syntax.

Thank you,

1 Solution

Accepted Solutions
sunny_talwar

May be this in your chart:

Sum({<[Major Group] = {'Beer'}>}[Sales Total])

View solution in original post

4 Replies
sunny_talwar

May be this in your chart:

Sum({<[Major Group] = {'Beer'}>}[Sales Total])

evansabres
Specialist
Specialist
Author

that worked perfectly, thank you

sunny_talwar

Awesome

hutchs
Contributor
Contributor

This has half fixed my problem. 

I would like to display data where two conditions are met.

Type = EQUIPMENT or ACCESSORY

I can get it to work with one, and have tried various strings to add the other parameter but cannot get it to work.

So far this works.

Sum({<[Type]={'EQUIPMENT'}> } [order_val])