Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Senor_Dai
Partner - Creator II
Partner - Creator II

Sum by Dimension Show Hide

HI,

 

I have a dimension called 'User' and an expression Sum(Daily Sales).

I would like to show a text object if any User has a daily sales amount of over 20.

IF anyone can help with the  correct show/hide expression please I'd be very grateful.  

Many thanks, 

Dai

 

Labels (1)
4 Replies
MayilVahanan

HI

Try like below

=Count({<User={"=Sum(DailySales)>0"}>}Distinct User)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Senor_Dai
Partner - Creator II
Partner - Creator II
Author

Hi @MayilVahanan ,

 

Thanks for the reply.  If I wanted to add a date to this eg, only for today, would the expression be

 

=Count({<User={"=Sum(DailySales)>0"}, Sale_Date={'Today()'}>}Distinct User)

 

Also, can you explain how this ensures that only sales over 20 will cause the obejct to display or do I need to add it the expression:

=Count({<User={"=Sum(DailySales)>0"}, Sale_Date={'Today()'}>}Distinct User)>20

MayilVahanan

Hi 


Try like below in the object to display 

=Count({<User={"=Sum({<Sale_Date= {'$(=Date(Today()))'}>}DailySales)>20"}>}Distinct User)

,  for understanding, you can try like below also.

=if(Count({<User={"=Sum({<Sale_Date= {'$(=Date(Today()))'}>}DailySales)>20"}>}Distinct User) > 1, 1, 0)

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

application useful word unscrambler