Forum Discussion
Aggregating Distinct Count measure and Aggregating IF measure
- 7 years ago
Hi Kevin_Gitonga,
Try these two measures, please.
Measure = SUMX ( SUMMARIZE ( 'table', 'table'[ProductCode], 'table'[CustomerCode], "Billing", DISTINCTCOUNT ( 'table'[InvNumber] ) ), [Billing] )
Total Golden Point = SUMX ( SUMMARIZE ( 'table', 'table'[ProductCode], 'table'[CustomerCode], "Golden Point", IF ( DISTINCTCOUNT ( 'table'[InvNumber] ) >= 1, 1, 0 ) ), [Billing] )
Best Regards,
- 7 years ago
Hi,
Try this measure
Billing = if(HASONEVALUE(Data[ProductCode]),DISTINCTCOUNT(Data[InvNumber]),SUMX(SUMMARIZE(VALUES(Data[ProductCode]),[ProductCode],"ABCD",DISTINCTCOUNT(Data[InvNumber])),[ABCD]))
Hope this helps.
- 7 years ago
Hi,
The Golden Points measure can be revised to:
Golden Point = SUMX(SUMMARIZE(GENERATE(VALUES(Sales[CustomerCode]),VALUES(Sales[ProductCode])),[CustomerCode],[ProductCode],"ABCD",if(DISTINCTCOUNT(Sales[InvNumber])>=1,1,0)),[ABCD])
Hope this helps.
You are welcome. For Golden points, use the same logic.
Ashish_MathurI tried the Golden point using the following formula and i'm gettting the correct total for the rows, but the total for the columns at the bottom is not correct, what could be the issue?
Golden Point = if(HASONEVALUE(Sales[ProductCode]),if(DISTINCTCOUNT(Sales[InvNumber])>=1,1,0),SUMX(SUMMARIZE(VALUES(Sales[ProductCode]),[ProductCode],"ABCD",if(DISTINCTCOUNT(Sales[InvNumber])>=1,1,0)),[ABCD]))
- Ashish_Mathur7 years ago
Super User
Hi,
Share the link from where i can download your PBI file.
- Kevin_Gitonga7 years ago
Helper I
Ashish_MathurHere's the link to the PBI file I'm using
https://www.dropbox.com/s/m9rlnrqu9afrial/Sales%20dashboard%20test-%20Copy.pbix?dl=0
- Kevin_Gitonga7 years ago
Helper I
hi Ashish_Mathur were you able to have a glance of the linked pbix file I'm using
- Ashish_Mathur7 years ago
Super User
Hi,
Try this simple measure for Golden Points
Golden Points = 1*[Billing]
Hope this helps.