Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
Check it out now!Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
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.