Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a column that determines whether the data in the Employee ID field in another table appears in this table. I managed to figure out to to do the calculation to give me a true/false so if it appears I have a response of True. Now, I need to figure out how to determine the % of True respones.
I tried using my normal "% Yes" code, but got an error message that you can't do that with True/False data.
% YES =
DIVIDE (
CALCULATE ( COUNT ( Table[Column] ), Table[Column] = "True" ),
CALCULATE ( COUNT ( Table[Column] ), ALLSELECTED ( Table[Column] ) )
)
How can I calculate the % of True responses so I can create a visual?
Solved! Go to Solution.
Hi @vozniak,
Create a new calculated column like this:
NumericBool = IF ( Table[isTrue] = TRUE (), 1, 0 )
Then you can apply your formula to this column:
% YES = DIVIDE ( CALCULATE ( COUNT ( Table[NumericBool] ), Table[NumericBool] = 1 ), CALCULATE ( COUNT ( Table[NumericBool] ), ALLSELECTED ( Table[NumericBool] ) ) )
Regards.
Hi @vozniak,
Create a new calculated column like this:
NumericBool = IF ( Table[isTrue] = TRUE (), 1, 0 )
Then you can apply your formula to this column:
% YES = DIVIDE ( CALCULATE ( COUNT ( Table[NumericBool] ), Table[NumericBool] = 1 ), CALCULATE ( COUNT ( Table[NumericBool] ), ALLSELECTED ( Table[NumericBool] ) ) )
Regards.
This is great. I am hoping to display this in a card as a percentage. If you have an idea, I am all ears. Thank you!
Thank you a million times! This worked perfectly and I've added it to my list of "go to" code.
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 | |
105 | |
88 | |
73 | |
66 |
User | Count |
---|---|
124 | |
113 | |
98 | |
81 | |
72 |