Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi there.
I have a Power BI report where I would like to calculate the Percentage of 100 for each of the options against the category values (the 'Yes' and 'No' options) identified in the image below.
For example, calculate the percentage out of 100 for Option 1; calculate the percentage out of 100 for Option 2 ect...
Any help on this would be appreciated.
Thank you.
Solved! Go to Solution.
@PowerEnthusiast - this measure works. All it effectively does is puts a % value on your data.
Values =
VAR varNumerator = SUM('Table'[Value])
RETURN
DIVIDE(
varNumerator,
100
)
So 18 for option 1 become 18% as an example. If that isn't what you need, please explain what you are expecting the output to be.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI Reporting@PowerEnthusiast - this measure works. All it effectively does is puts a % value on your data.
Values =
VAR varNumerator = SUM('Table'[Value])
RETURN
DIVIDE(
varNumerator,
100
)
So 18 for option 1 become 18% as an example. If that isn't what you need, please explain what you are expecting the output to be.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingWe would need data (see links below) to really help @PowerEnthusiast , but something along the lines of this would work for the No values, and a similar measure would work for Yes values.
Measure =
VAR varNumerator =
SUMX(
FILTER(
Table,
Table[Field] = "No"
),
Table[Value]
)
RETURN
DIVIDE(
varNumerator,
100
)
How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingThank you for the response.
The table looks like this:
Where there is an 'Options' table used for the x-axis.
Also, getting the percentages to visualise on a stacked chart - as shown in the initial image, would be ideal 🙂
Again @PowerEnthusiast - please see the links below for providing data. I'm not rekeying that in. Thanks!
How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingOptionsValueLegend
Option 2 | 8 | Yes |
Option 4 | 9 | Yes |
Option 6 | 9 | No |
Option 5 | 6 | No |
Option 1 | 7 | Yes |
Option 6 | 3 | Yes |
Option 4 | 9 | No |
Option 3 | 4 | Yes |
Option 2 | 7 | Yes |
Option 5 | 10 | Yes |
Option 6 | 1 | No |
Option 2 | 6 | Yes |
Option 3 | 8 | No |
Option 4 | 4 | Yes |
Option 2 | 10 | Yes |
Option 2 | 1 | Yes |
Option 4 | 7 | No |
Option 3 | 2 | No |
Option 1 | 3 | Yes |
Option 2 | 5 | No |
Option 6 | 9 | Yes |
Option 6 | 7 | Yes |
Option 1 | 8 | Yes |
Option 6 | 7 | Yes |
Option 4 | 9 | No |
Option 4 | 3 | Yes |
Option 5 | 6 | No |
Option 4 | 5 | No |
Option 3 | 8 | Yes |
Got it @PowerEnthusiast - let me play with it. 👍
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingUser | Count |
---|---|
128 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |