Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Dax function for the below steps from table AAA
Solved! Go to Solution.
Hi @Anonymous ,
Please try:
Count of Column = COUNTROWS('Table')
- B% DAX =
VAR allCount = CALCULATE(COUNTROWS('Table'),ALL('Table'))
RETURN
DIVIDE([Count of Column],allCount)
Once created, if you want to display percentages without decimals, you can check "%" in the Measure tool tab and then select the number of decimals to be followed by zero.
If you use the Format function, it will default to two decimal places.
- B% DAX =
VAR allCount = CALCULATE(COUNTROWS('Table'),ALL('Table'))
RETURN
FORMAT(DIVIDE([Count of Column],allCount), "Percent")
Drag the created measures to the report page for display, the page effect is shown below:
The pbix file is attached.
If you have any other questions please feel free to contact me.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Thanks much for helping on this. Let me elaborate my question clearly.
Source Table | |
Column - A (TEXT) | Column - B (TEXT) |
Furniture | A01234 |
Furniture | A12345 |
Accessories | C24564 |
Accessories | C22335 |
Accessories | D57845 |
Accessories | D65894 |
Accessories | E55882 |
Equipment | K98562 |
Equipment | K85857 |
Equipment | K22335 |
Equipment | L65875 |
Equipment | L78548 |
Equipment | L12548 |
Required Output | ||
Column - A (TEXT) | Count of Column - B | % DAX |
Furniture | 2 | 15% |
Accessories | 5 | 38% |
Equipment | 6 | 46% |
Total | 13 | 100% |
Hi @Anonymous ,
Please try:
Count of Column = COUNTROWS('Table')
- B% DAX =
VAR allCount = CALCULATE(COUNTROWS('Table'),ALL('Table'))
RETURN
DIVIDE([Count of Column],allCount)
Once created, if you want to display percentages without decimals, you can check "%" in the Measure tool tab and then select the number of decimals to be followed by zero.
If you use the Format function, it will default to two decimal places.
- B% DAX =
VAR allCount = CALCULATE(COUNTROWS('Table'),ALL('Table'))
RETURN
FORMAT(DIVIDE([Count of Column],allCount), "Percent")
Drag the created measures to the report page for display, the page effect is shown below:
The pbix file is attached.
If you have any other questions please feel free to contact me.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Thanks a lot for your help.
Thank you very much, Amit for your help.
This still needs some modification as the expected result should be something as below:
Row 1 - 55/277
Row 2 - 40/277 ..........
Column 1 | Row Count (Grouped) | Divide |
A | 55 | 20% |
B | 40 | 14% |
C | 20 | 7% |
D | 78 | 28% |
E | 6 | 2% |
F | 78 | 28% |
277 | 100% |
Hi @Anonymous ,
This is sample data:
This is your expected result:
Please try:
TotalColumn1 = CALCULATE(SUM('Table'[Row Count (Grouped)]),ALL('Table'))
Column = DIVIDE([Row Count (Grouped)],[TotalColumn1])
You can do it with a measure, but it defaults to two decimals when converted to a percentage, and total is wrong, so it is better to use a New column.
The pbix file is attached.
If you have any other questions please feel free to contact me.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
67 | |
51 | |
38 | |
26 |
User | Count |
---|---|
89 | |
52 | |
45 | |
39 | |
38 |