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: 
chirums1
Contributor
Contributor

Data level Filter

Hi Team,

 

Hope everyone is doing good.

In my data model I have 3 Tables: Fact, Product and Country. I'm showing the data at Country and Product level in a bar chart and I want to not show one country and product either from the data or from the chart. 

For example I don't want to show the Product: Laptop for the China country (but for other countries it should show)

I have attached sample data for your reference. Kindly help me on this.

Regards,

Chiru

Labels (3)
4 Replies
sidhiq91
Specialist II
Specialist II

@chirums1  You can try something like below in your bar chart.

In your measure please use the expression as below:

if(Country='China', Sum({<[Product Name]-={'Laptops'}>}Amount),Sum(Amount))

this is just for China, you can implement the same expression with multiple ifs for other conditions too.

If this resolves your issue, please like and accept it as a solution.

 

sidhiq91_0-1701001676090.png

 

Anil_Babu_Samineni

Perhaps this?

Sum({<Product=E({<Country={'China'}, Product={'Laptop'}>}Product)>} Amount)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I think @Anil_Babu_Samineni approach is great but I would use something like an ID field as the set modifier:

Sum({<OrderID=E({<Country={'China'}, Product={'Laptop'}>}Product)>} Amount)

Anil_Babu_Samineni

@chirums1 Make sure you have closed this thread with correct answer.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful