Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 Sa_Rah
		
			Sa_Rah
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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)
Thanks
Sarah
@Sa_Rah Similar way you can add how many you want full total.
Sum(Total <YourDimension, YourDimension1, YourDimension2, ...> Purchases)
@Sa_Rah Can't this be simply like
Count (Total <YourDimension> Purchases) //Your dimension is that values are Eggs, Cheese ..
 Sa_Rah
		
			Sa_Rah
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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 Similar way you can add how many you want full total.
Sum(Total <YourDimension, YourDimension1, YourDimension2, ...> Purchases)
 Sa_Rah
		
			Sa_Rah
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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)
If I remove the 'Purchases' dimension then I end up with the following:
Sum(Total <FinYear, FinYearQuarter, Month> Purchases)
 Sa_Rah
		
			Sa_Rah
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
