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 have a column with digits from 0 - 9, and I want a measure to calculate the percentage for of the count of each of the digits 0 - 9 relative to the total count of digits in the column.
Solved! Go to Solution.
Hi,
Try this measure. Format it as a %
=COUNT(Data[First Digit])/CALCULATE(COUNT(Data[First Digit]),ALL(Data[First Digit]))
Hope this helps.
Hi melvinkishore,
'I want a measure to calculate the percentage for of the count of each of the digits 0 - 9 relative to the total count of digits in the column.'
<--- Could you share some sample data and clarify more details about your logic and expected result?
Regards,
Jimmy Tao
Hi Jimmy Tao,
I have shared the data and the solution. I can get the solution easily on a pivot table but need help with DAX.
Hi,
Try this measure. Format it as a %
=COUNT(Data[First Digit])/CALCULATE(COUNT(Data[First Digit]),ALL(Data[First Digit]))
Hope this helps.
I got this error message
You are missing 2 closing brackets, one before / and another before ,. Look at my formula carefully.
Thank You Anish, I managed to get the output I wanted.
Much appreciated, Melvin
You are welcome.
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |