Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
rido1421
Creator III
Creator III

Pivot Table Calculation

Hi There

I have a pivot table, I am counting the Dates in the last column, I would like to count only the dates where there are values greater than 0

so for Currency1 AUD there should only be a count of 3.

Your assistance is appreciated.

8 Replies
PrashantSangle

Hi,

try this,

If(SecondaryDimensionality()<> 0,Count(if(Amount>0,Date)))

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Gysbert_Wassenaar

Perhaps like this:

If(SecondaryDimensionality()<> 0,

     Sum(Amount),

     Count({<Amount={'>0'}>}Date)

)


talk is cheap, supply exceeds demand
trdandamudi
Master II
Master II

Try as below:

If(SecondaryDimensionality()<> 0,Sum(Amount),Count({<Amount= {'<> 0'}>}  Date))

rido1421
Creator III
Creator III
Author

My real expression is something like this  Sum(Aggr(Sum({<Category={'CUS'}>}Distinct Amount),DEALS))

Would I have to create a variable to do it the way you suggest?

Gysbert_Wassenaar

No, but if you want to count deals then summing amounts won't give you the answer.


talk is cheap, supply exceeds demand
rido1421
Creator III
Creator III
Author

Hi Gysbert

Instead of Sum(Amount) my expression is Sum(Aggr(Sum({<Category={'CUS'}>}Distinct Amount),DEALS))

How would I do this Portion if my expression is as mentioned?

    " Count({<Amount={'>0'}>}Date) "

Gysbert_Wassenaar

Sorry, I don't understand what you're trying to do.


talk is cheap, supply exceeds demand
sunny_talwar

Would you be able to provide an update sample where you have DEAL in the database to see what exactly are you trying to do?