cancel
Showing results for
Did you mean:
New Member

## Card visual help

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.

1 ACCEPTED SOLUTION
Super User

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.

9 REPLIES 9
Super User

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.

New Member

what am I doing wrong here? @VahidDM

Super User

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.

New Member
Satisfication with Provider =
Var _SVS = Calculate(counta('Qualtrics Survey sample data'[Satisfaction with provider],filter(all'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]],filter(all(table))
return
_SVS/_AO

here it is @VahidDM
Super User

@aravindhmohan

``````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;

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.

New Member

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
Super User

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.

New Member

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)

Super User

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.

Announcements

#### 2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

#### Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

#### Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

#### Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.

Top Solution Authors
Top Kudoed Authors