Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I have a survey data that has 5 different responses, I want to show the percentage of two fields compared to the total 5 fields.
Very satisfied, satisfied, neutral, dissatisfied, very dissatisfied are the fields for this task. I want to display satisfied + very satisfied as a percentage of the total.
Solved! Go to Solution.
Try this:
Satisfication with Provider =
VAR _SVS =
CALCULATE (
CountA('Qualtrics Survey sample data'[Satisfaction with provider]),
FILTER (
ALL ( 'Qualtrics Survey sample data' ),
'Qualtrics Survey sample data'[Satisfaction with provider] = "Satisfied"
|| 'Qualtrics Survey sample data'[Satisfaction with provider] = "Very satisfied"
)
)
VAR _AO =
CALCULATE (
CountA('Qualtrics Survey sample data'[Satisfaction with provider]),
ALL ( 'Qualtrics Survey sample data' )
)
RETURN
_SVS/_AO
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Hi @aravindhmohan
Try this measure:
Measure =
Var _SVS = Calculate(counta(table[column with data],filter(all(table),table[column with data]="satisfied"&&table[column with data]="very satisfied"))
Var _AO = Calculate(counta(table[column with data],filter(all(table))
return
_SVS/_AO
Change the Measure format top Percentage and replace the red items in measure with the column name that has those items.
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Just change the red text with column name between [ ] and then ="...".
Copy and paste the measure here as a text not image then I will update that.
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Satisfication with Provider =
VAR _SVS =
CALCULATE (
COUNTA ( 'Qualtrics Survey sample data'[Satisfaction with provider] ),
FILTER (
ALL ( 'Qualtrics Survey sample data' ),
'Qualtrics Survey sample data'[Satisfaction with provider] = "satisfied"
&& 'Qualtrics Survey sample data'[Satisfaction with provider] = "Very satisfied"
)
)
VAR _AO =
CALCULATE (
COUNTA ( 'Qualtrics Survey sample data'[Satisfaction with provider] ),
ALL ( 'Qualtrics Survey sample data' )
)
RETURN
_SVS / _AO
Hi
Can you post sample data as text and expected output?
Not enough information to go on;
please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
4. Relation between your tables
Appreciate your Kudos!!
LinkedIn:www.linkedin.com/in/vahid-dm/
Here is the sample data. I want to display the % of contacts happy (satisfied and very satisfied) with the provider as a card.
Contact Fields - Recipient Last Name | Satisfaction with qual | Satisfaction with provider |
Harmey | Neither satisfied nor dissatisfied | Very satisfied |
Brown | Dissatisfied | Neither satisfied nor dissatisfied |
Sutton | Satisfied | Neither satisfied nor dissatisfied |
Liang | Very satisfied | Very satisfied |
Fleming | Satisfied | Satisfied |
Campbell | Very satisfied | Neither satisfied nor dissatisfied |
Green | Satisfied | Satisfied |
Urquhart | Very dissatisfied | Very dissatisfied |
Preston | Neither satisfied nor dissatisfied | Neither satisfied nor dissatisfied |
Kacho Ochana | Very satisfied | Very dissatisfied |
Macri | Satisfied | Satisfied |
Walker | Very satisfied | Very satisfied |
Watts | Satisfied | Neither satisfied nor dissatisfied |
Miller | Satisfied | Satisfied |
Padden | Very satisfied | Very satisfied |
Chen | Very satisfied | Very satisfied |
Limbrick | Neither satisfied nor dissatisfied | Neither satisfied nor dissatisfied |
Martin | Neither satisfied nor dissatisfied | Neither satisfied nor dissatisfied |
Ong | Satisfied | Very satisfied |
Aulia | Satisfied | Satisfied |
Taylor | Satisfied | Satisfied |
Wharemahihimako | Very satisfied | Very satisfied |
Try this:
Satisfication with Provider =
VAR _SVS =
CALCULATE (
COUNTROWS('Qualtrics Survey sample data'),
FILTER (
ALL ( 'Qualtrics Survey sample data' ),
'Qualtrics Survey sample data'[Satisfaction with provider] = "Satisfied"
|| 'Qualtrics Survey sample data'[Satisfaction with provider] = "Very satisfied"
)
)
VAR _AO =
CALCULATE (
COUNTROWS('Qualtrics Survey sample data'),
ALL ( 'Qualtrics Survey sample data' )
)
RETURN
_SVS/_AO
Output:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
This is awesome, it works as intended except for one small issue. The field can also be empty if the response wasnt filled for that field and as such it is counting the total rows (including blank rows)
Try this:
Satisfication with Provider =
VAR _SVS =
CALCULATE (
CountA('Qualtrics Survey sample data'[Satisfaction with provider]),
FILTER (
ALL ( 'Qualtrics Survey sample data' ),
'Qualtrics Survey sample data'[Satisfaction with provider] = "Satisfied"
|| 'Qualtrics Survey sample data'[Satisfaction with provider] = "Very satisfied"
)
)
VAR _AO =
CALCULATE (
CountA('Qualtrics Survey sample data'[Satisfaction with provider]),
ALL ( 'Qualtrics Survey sample data' )
)
RETURN
_SVS/_AO
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
User | Count |
---|---|
42 | |
28 | |
23 | |
18 | |
15 |
User | Count |
---|---|
54 | |
35 | |
18 | |
17 | |
15 |