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.
Hello,
Does any one know how to calculate a column that has text and number for data?
I can calculate the results for the Column Overall Satisfaction using this DAX formula
but how would I write it for the Columns that have both text and number?
Survey ID | Overall Satisfaction | Spa Satisfaction | Pool Satisfaction |
1000001 | 10 | 9 | 10 |
1000002 | 9 | 8 | 10 |
1000003 | 10 | Did not use | 10 |
1000004 | 9 | Did not use | 9 |
1000005 | 6 | 8 | 2 |
1000006 | 8 | 10 | 7 |
1000007 | 9 | 8 | 9 |
1000008 | 8 | 6 | 9 |
1000009 | 9 | Did not use | 9 |
1000010 | 9 | 8 | 9 |
1000011 | 8 | 7 | 9 |
1000012 | 3 | 6 | 8 |
1000013 | 1 | 3 | Did not use |
1000014 | 5 | 9 | 4 |
1000015 | 8 | Did not use | 8 |
Solved! Go to Solution.
Hi,
I am not sure if I understood your question correctly, but please check the below three measures, and the attached pbix file.
I think Overall Satisfaction Score measure also has to be written in a different way, like the below.
Please check if the below results are what you expected.
Overall Satisfaction Score =
DIVIDE (
CALCULATE (
COUNT ( 'Table1'[Overall Satisfaction] ),
FILTER ( 'Table1', 'Table1'[Overall Satisfaction] * 1 >= 9 )
),
CALCULATE (
COUNT ( 'Table1'[Overall Satisfaction] ),
FILTER ( 'Table1', 'Table1'[Overall Satisfaction] * 1 >= 1 )
)
)
Spa Satisfaction Score =
DIVIDE (
CALCULATE (
COUNT ( 'Table1'[Spa Satisfaction] ),
FILTER (
'Table1',
'Table1'[Spa Satisfaction] * 1 >= 9
&& 'Table1'[Spa Satisfaction] <> "Did not use"
)
),
CALCULATE (
COUNT ( 'Table1'[Spa Satisfaction] ),
FILTER (
'Table1',
'Table1'[Spa Satisfaction] * 1 >= 1
&& 'Table1'[Spa Satisfaction] <> "Did not use"
)
)
)
Pool Satisfaction Score =
DIVIDE (
CALCULATE (
COUNT ( 'Table1'[Pool Satisfaction] ),
FILTER (
'Table1',
'Table1'[Pool Satisfaction] * 1 >= 9
&& 'Table1'[Pool Satisfaction] <> "Did not use"
)
),
CALCULATE (
COUNT ( 'Table1'[Pool Satisfaction] ),
FILTER (
'Table1',
'Table1'[Pool Satisfaction] * 1 >= 1
&& 'Table1'[Pool Satisfaction] <> "Did not use"
)
)
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
@Jihwan_Kim Wow. This is what I need and couldn't achieve. Thank you so much for your guidance and solution.
Hi,
I am not sure if I understood your question correctly, but please check the below three measures, and the attached pbix file.
I think Overall Satisfaction Score measure also has to be written in a different way, like the below.
Please check if the below results are what you expected.
Overall Satisfaction Score =
DIVIDE (
CALCULATE (
COUNT ( 'Table1'[Overall Satisfaction] ),
FILTER ( 'Table1', 'Table1'[Overall Satisfaction] * 1 >= 9 )
),
CALCULATE (
COUNT ( 'Table1'[Overall Satisfaction] ),
FILTER ( 'Table1', 'Table1'[Overall Satisfaction] * 1 >= 1 )
)
)
Spa Satisfaction Score =
DIVIDE (
CALCULATE (
COUNT ( 'Table1'[Spa Satisfaction] ),
FILTER (
'Table1',
'Table1'[Spa Satisfaction] * 1 >= 9
&& 'Table1'[Spa Satisfaction] <> "Did not use"
)
),
CALCULATE (
COUNT ( 'Table1'[Spa Satisfaction] ),
FILTER (
'Table1',
'Table1'[Spa Satisfaction] * 1 >= 1
&& 'Table1'[Spa Satisfaction] <> "Did not use"
)
)
)
Pool Satisfaction Score =
DIVIDE (
CALCULATE (
COUNT ( 'Table1'[Pool Satisfaction] ),
FILTER (
'Table1',
'Table1'[Pool Satisfaction] * 1 >= 9
&& 'Table1'[Pool Satisfaction] <> "Did not use"
)
),
CALCULATE (
COUNT ( 'Table1'[Pool Satisfaction] ),
FILTER (
'Table1',
'Table1'[Pool Satisfaction] * 1 >= 1
&& 'Table1'[Pool Satisfaction] <> "Did not use"
)
)
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
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 |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |