Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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!
Hi @NilR ,
Please provide a sample data and I will try to rebuild the measure in Power BI Desktop.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@NilR Guessing but could be a casing problem. DAX ignores case so Greg and greg are 1 distinct value.
I checked, It's all Numbers ! Can I rewrite the measure in diff way?
User | Count |
---|---|
98 | |
90 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
66 |