This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi all,
First many thanks to allow us aking for support,
I am quite new in powerBi and still having bas reflex I guess.
I am trying to calculate some percentage but i failed and very frustrated as in Excel It would take me seconds
My table is as below
Count of Field1 means I have in the Table many records with code =1 or Code =2 etc.. up to 100 000 for code 1 for example
Code count of field1
1 100 000 %?
2 1000 %?
3 2000
4 500
5 700
Total = 104 200
I am trying to calculate the % of each "count-of-record- per code and loss my hair.
Any help would be very appreciated.
Solved! Go to Solution.
I am not sure what do you mean by Field 1, 2, 3...
But logic should be the same. Instead of SUM for numbers you will use COUNT.
Count of Codes = COUNT(Table[CodeID])
All Codes = CALCULATE([Count of Codes],ALL(Table))
In case this is not helpful, please provide me a printscreen from excel with input and expected output.
Thanks it works as well
Hi @tum ,
One of the optionn you can do is to use CALCULATE with a combination of ALL. This would give you the Grand total, which you can later divide with row level values.
For example I have this sample report with 3 measures:
Thanks a lot for your help.
Have you noticed that "Count of field 1" means "count" of all rows with code 1 and not a number.
This is my point.
My table is as such :
code Field1 field2 field3
1 x x x
2 x x x
1 x x x
1 Y Z a
2 Y Z a
Then I calculate how many code 1, code2 etc... (count of field)
Then I am trying to calculate % of code 1 rows of all rows so total of code 1 rows / total rows
So % of each code rows / total of rows
Thks for your help
I am not sure what do you mean by Field 1, 2, 3...
But logic should be the same. Instead of SUM for numbers you will use COUNT.
Count of Codes = COUNT(Table[CodeID])
All Codes = CALCULATE([Count of Codes],ALL(Table))
In case this is not helpful, please provide me a printscreen from excel with input and expected output.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 31 | |
| 25 | |
| 21 | |
| 18 | |
| 17 |
| User | Count |
|---|---|
| 62 | |
| 34 | |
| 33 | |
| 24 | |
| 23 |