Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Hiding expression total based on a condition

I have a straight table that shows currency code and amounts in different currencies. I have to show the total of the amounts which I do by expression totals. Since it is in different currencies, the user wants to show the total only when they select one currency code. The way that I could achieve this is by creating another table with totals and hiding/unhiding it based on the selection. If there is a better way to do that, please advise. But now here comes the challenge. If I have 3 rows, 2 rows in USD with non-zero amounts and the third row in CAD with zero amounts. The users are okay to show the total in this case as you are summing USD amounts with '0' CAD amounts. Is there a way to do this?

1 Reply
Anonymous
Not applicable
Author

You could do something like:

    if(count(distinct Currency)=1,sum(Amount))

This should result in figures being shown for each Currency row (as the dimension will limit this to being just one currency) while the totals should show only when only one currency exists too.

Not sure about the challenge you mention.

Jonathan