Forum Discussion
Hijbul_Bari
4 years agoFrequent Visitor
DAX Distinct Count Grand Total Showing incorrect value
Why my Calculation didnt give correct Grand Total. Grand Total will be 33 but showing 44. Please help. SUMX( VALUES(data[Date]), CALCULATE(DISTINCTCOUNT(data[Wrap-up]),DATESINPERIOD(data[Date],...
- Anonymous4 years ago
Hi Hijbul_Bari ,
Here are the steps you can follow:
1. Create measure.
Count_measure = COUNTX(FILTER(ALL(data),'data'[Date]<=MAX('data'[Date])&&'data'[Date]>MAX('data'[Date])-2),[Wrap-up])Sum_Total = var _table=SUMMARIZE('data','data'[Date],"_value",[Count_measure]) return IF(HASONEVALUE('data'[Date]),[Count_measure],SUMX( _table,[_value]))2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Anonymous
4 years agoNot applicable
Hi Hijbul_Bari ,
Here are the steps you can follow:
1. Create measure.
Count_measure =
COUNTX(FILTER(ALL(data),'data'[Date]<=MAX('data'[Date])&&'data'[Date]>MAX('data'[Date])-2),[Wrap-up])Sum_Total =
var _table=SUMMARIZE('data','data'[Date],"_value",[Count_measure])
return
IF(HASONEVALUE('data'[Date]),[Count_measure],SUMX( _table,[_value]))
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly