Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi, how i can calculate the percent of "type" of each month in power bi?¿Quick measure?
NAME | TYPE | MONTH | YEAR |
Andy | C | 3 | 2019 |
Michael | A | 3 | 2019 |
Diana | B | 3 | 2019 |
Luis | A | 3 | 2019 |
Yasme | B | 3 | 2019 |
Kati | C | 3 | 2019 |
Rafa | A | 3 | 2019 |
Yuli | B | 3 | 2019 |
Ange | A | 3 | 2019 |
Andy | A | 4 | 2019 |
Michael | A | 4 | 2019 |
Diana | A | 4 | 2019 |
Luis | B | 4 | 2019 |
Yasme | B | 4 | 2019 |
Kati | B | 4 | 2019 |
Rafa | C | 4 | 2019 |
Yuli | C | 4 | 2019 |
Ange | C | 4 | 2019 |
Weyman | A | 4 | 2019 |
Graphic Example:
month | ||
3 | 4 | |
A | 44% | 40% |
B | 33% | 30% |
C | 22% | 30% |
in a power bi stacked column chart
Solved! Go to Solution.
You can use this measure:
Measure = DIVIDE( COUNTROWS(Table2), CALCULATE( COUNTROWS( Table2 ), ALLEXCEPT(Table2, Table2[MONTH]) ) )
which produces this matrix and the associated bar chart:
You can use this measure:
Measure = DIVIDE( COUNTROWS(Table2), CALCULATE( COUNTROWS( Table2 ), ALLEXCEPT(Table2, Table2[MONTH]) ) )
which produces this matrix and the associated bar chart:
Hi
Assuming you are just counting the number of items in the table the calculation could look something like this.
[% of Month Total]=DIVIDE(COUNTROWS('Table1') , CALCULATE(COUNTROWS('Table1'),all(Table1[Type])))
This is the result I got
# I did it in Power Pivot but it is the same for Power BI
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 |
---|---|
105 | |
101 | |
81 | |
79 | |
67 |
User | Count |
---|---|
120 | |
110 | |
94 | |
81 | |
77 |