Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi All,
I have a table in which Column A has some values and I am trying to calculate percentage as shown in below table:
Column A |
abc |
abc |
xyz |
xyz |
abc |
abc |
Percentage | |
abc | xyz |
66.66% | 33.33% |
Is there any query that can give me the percentage as shown above?
Solved! Go to Solution.
(1)Create a column to count the number of category .
column A num = CALCULATE(COUNTROWS('Table'),ALLEXCEPT('Table','Table'[Column A]))
(2)Create a column to count the number of the table
whole num = COUNTROWS('Table')
(3)Create a column to count the percentage
percentage = 'Table'[column A num]/'Table'[whole num]
Then add a Matrix visual and put Column A into Columns ,put percentage into Values .
The final result is as shown :
I have attached my pbix file ,you can refer to it .
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
(1)Create a column to count the number of category .
column A num = CALCULATE(COUNTROWS('Table'),ALLEXCEPT('Table','Table'[Column A]))
(2)Create a column to count the number of the table
whole num = COUNTROWS('Table')
(3)Create a column to count the percentage
percentage = 'Table'[column A num]/'Table'[whole num]
Then add a Matrix visual and put Column A into Columns ,put percentage into Values .
The final result is as shown :
I have attached my pbix file ,you can refer to it .
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Pooja_Mishra , Create a measure like
percent = divide( countrows(Table), calculate( countrows(Table), allselected(Table)))
// mark as % in measure tool
In matrix , Enable : Show on row
Use column on Column of matrix. Nothing on row
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
86 | |
82 | |
65 | |
63 | |
56 |
User | Count |
---|---|
171 | |
111 | |
110 | |
72 | |
71 |