Forum Discussion
placeholder erro with distintcount function
- 2 years ago
yamina in my opinon your previous result wasn't correct, because the sum of 1270 + 1065 +1028 + 853 + 794 + 905 + 635 is 6550, not 6365. If you want to share the pbix file I can help you.
Alternative approach using calculated columns and measures:1. Calculated Column for Sum Check:
Is_Sum_Zero =
IF( CALCULATE( SUM(HG[montant_facture]), ALLEXCEPT(HG, HG[reference_secondaire]) ) = 0, 1, 0 )2. Measure for Distinct Count Using Calculated Column:
Distinct_Count_Reference_Zero_Sum_Alt =
CALCULATE( DISTINCTCOUNT(HG[reference_secondaire]), FILTER(HG, HG[Is_Sum_Zero] = 1) )Please if it's correct, then accept my answer as solution.
BBF
Hi
Thank you very clear , it seems to do the job but I have a little difference int he result that I have to understand
- BeaBF2 years ago
Super User
yamina in my opinon your previous result wasn't correct, because the sum of 1270 + 1065 +1028 + 853 + 794 + 905 + 635 is 6550, not 6365. If you want to share the pbix file I can help you.
Alternative approach using calculated columns and measures:1. Calculated Column for Sum Check:
Is_Sum_Zero =
IF( CALCULATE( SUM(HG[montant_facture]), ALLEXCEPT(HG, HG[reference_secondaire]) ) = 0, 1, 0 )2. Measure for Distinct Count Using Calculated Column:
Distinct_Count_Reference_Zero_Sum_Alt =
CALCULATE( DISTINCTCOUNT(HG[reference_secondaire]), FILTER(HG, HG[Is_Sum_Zero] = 1) )Please if it's correct, then accept my answer as solution.
BBF
- yamina2 years ago
Helper I
Unfortunately i can 't share you the file it is not supported
However I try with your second alternative measures I get the same result so I suppose that it is correct. How can i share you the file ?