Forum Discussion
NilR
5 years agoPost Patron
Distinct Count doesn't match to Excel file raw data
I created Pivot in Excel and selected Distinct Count, however , the measure I created in PBI doesn't match to distinct count in Excel. Can you help me to fix my measure?
Excel:
Measure:
Var _Calc= CALCULATETABLE(
SUMMARIZE('COVID_INDV_PERIODS',[SERVICE_DESC],
"_COUNT", DISTINCTCOUNTNOBLANK('COVID_INDV_PERIODS'[ID])),
FILTER('COVID_INDV_PERIODS', [GP_NB]=_gpnb
&& [SERVICE_DESC]="Confirmed"
&& ([PAID_DATE] >= _min_Pdate && [PAID_DATE] <= _max_Pdate)
&& ([SERVICE_DATE] >= _min_SVCdate && [SERVICE_DATE] <= _max_SVCdate) ))
Return
SUMX(DISTINCT(_TempTable),[_COUNT])
Result in PBI which is wrong:
Thanks!
3 Replies
- Greg_DecklerCommunity Champion
NilR Guessing but could be a casing problem. DAX ignores case so Greg and greg are 1 distinct value.
- NilRPost Patron
I checked, It's all Numbers ! Can I rewrite the measure in diff way?
- v-lionel-msftCommunity Support
Hi NilR ,
Please provide a sample data and I will try to rebuild the measure in Power BI Desktop.
Best regards,
Lionel ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.