Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I am actively looking for the solution to resolve the issue appeared several times in my Power BI report. So I have created the measure to calculate the distinct count of the users which are connected City/country-wise by using below DAX.
Total User Connected(Wireless) = CALCULATE( DISTINCTCOUNT('Posture assessment'['ENDPOINT_ID']),FILTER('Posture assessment','Posture assessment'[NAC Policy ]="Wireless"))
And my grand total and subtotal is completely wrong as compared to actual row count. Then I tried a different approach with this DAX below but no change. Total is still wrong.
Count of Unique = SUMX(Values('Posture assessment'[Region]),CALCULATE(DISTINCTCOUNT('Posture assessment'['ENDPOINT_ID']),FILTER('Posture assessment','Posture assessment'[NAC Policy ]="Wireless")))
Table illustration is: Here, for example, India's value is different as compared to the total.
Solved! Go to Solution.
@Anonymous , Try to rollup from city level
Count of Unique = SUMX(summarize('Posture assessment','Posture assessment'[Region],'Posture assessment'[Country],'Posture assessment'[City],"_1",CALCULATE(DISTINCTCOUNT('Posture assessment'['ENDPOINT_ID']),FILTER('Posture assessment','Posture assessment'[NAC Policy ]="Wireless"))),[_1])
@Anonymous , Try to rollup from city level
Count of Unique = SUMX(summarize('Posture assessment','Posture assessment'[Region],'Posture assessment'[Country],'Posture assessment'[City],"_1",CALCULATE(DISTINCTCOUNT('Posture assessment'['ENDPOINT_ID']),FILTER('Posture assessment','Posture assessment'[NAC Policy ]="Wireless"))),[_1])
Thanks for the quick help Amit, It is working.
Just wanted to know why we are using "_1". Is this to calculate row or some kind of indexing.
Please explain.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |