Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Sa_Rah
Contributor III
Contributor III

Measure showing total count

Hi

I'm trying to create a measure for the Total Purchases field in the below, and I'm not having much success.

I've tried a number of different formulae including the following, but I'm not getting what I need and I'm not sure where I'm going wrong

Count( total <FinYearDate, FinYearQuarterDate, MonthDate> distinct{<Flag = {'PurchaseDate'}, Retailer ={"*"} >} REF)

Sa_Rah_0-1708347979156.png

Thanks

Sarah

Labels (2)
1 Solution

Accepted Solutions
Anil_Babu_Samineni

@Sa_Rah Similar way you can add how many you want full total.

Sum(Total <YourDimension, YourDimension1, YourDimension2, ...> Purchases)

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

View solution in original post

5 Replies
Anil_Babu_Samineni

@Sa_Rah Can't this be simply like

Count (Total <YourDimension> Purchases) //Your dimension is that values are Eggs, Cheese ..

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
Sa_Rah
Contributor III
Contributor III
Author

Thanks Anil. This counts over each of my products, but doesn't take into account the time period. It provides the yellow field below:

Sa_Rah_1-1708364744954.png

 

 

Anil_Babu_Samineni

@Sa_Rah Similar way you can add how many you want full total.

Sum(Total <YourDimension, YourDimension1, YourDimension2, ...> Purchases)

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
Sa_Rah
Contributor III
Contributor III
Author

Hi Anil

This doesn't seem to make a difference, I still end up with the same as above:

Sum(Total <Purchases, FinYear, FinYearQuarter, Month> Purchases)

Sa_Rah_0-1708423967273.png

 

If I remove the 'Purchases' dimension then I end up with the following:

Sum(Total <FinYear, FinYearQuarter, Month> Purchases)

 

Sa_Rah_2-1708424383889.png

 

 

 

Sa_Rah
Contributor III
Contributor III
Author

I've identified my issue! 

The date dimensions I'm using are filtered using if clauses, i.e. the visualisation is only showing dates after a certain time point.

I don't understand why, but this is affecting how the totals appear.

Removing these date restrictions from my date fields means the above method Sum(Total <YourDimension, YourDimension1, YourDimension2, ...> Purchases) works just fine.

 

Thanks Anil for your help