cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
aravindhmohan
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

Hi @aravindhmohan 

 

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/

 

 

View solution in original post

9 REPLIES 9
VahidDM
Super User
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.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

aravindhmohan_0-1637532007924.png

what am I doing wrong here? @VahidDM 

@aravindhmohan 

 

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'[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 

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

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 NameSatisfaction with qualSatisfaction with provider
HarmeyNeither satisfied nor dissatisfiedVery satisfied
BrownDissatisfiedNeither satisfied nor dissatisfied
SuttonSatisfiedNeither satisfied nor dissatisfied
LiangVery satisfiedVery satisfied
FlemingSatisfiedSatisfied
CampbellVery satisfiedNeither satisfied nor dissatisfied
GreenSatisfiedSatisfied
UrquhartVery dissatisfiedVery dissatisfied
PrestonNeither satisfied nor dissatisfiedNeither satisfied nor dissatisfied
Kacho OchanaVery satisfiedVery dissatisfied
MacriSatisfiedSatisfied
WalkerVery satisfiedVery satisfied
WattsSatisfiedNeither satisfied nor dissatisfied
MillerSatisfiedSatisfied
PaddenVery satisfiedVery satisfied
ChenVery satisfiedVery satisfied
LimbrickNeither satisfied nor dissatisfiedNeither satisfied nor dissatisfied
MartinNeither satisfied nor dissatisfiedNeither satisfied nor dissatisfied
OngSatisfiedVery satisfied
AuliaSatisfiedSatisfied
TaylorSatisfiedSatisfied
WharemahihimakoVery satisfiedVery satisfied

Hi @aravindhmohan 

 

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:

VahidDM_0-1637618003391.png

 

 

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)

Hi @aravindhmohan 

 

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/

 

 

Helpful resources

Announcements
Carousel_PBI_Wave1

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.

Power BI Summit Carousel 2

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!

BizApps LATAM 2023

Business Application LATAM Summit 2023

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

Power Platform Bootcamp

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