Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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.
User | Count |
---|---|
96 | |
85 | |
77 | |
66 | |
63 |
User | Count |
---|---|
110 | |
96 | |
96 | |
67 | |
59 |