Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
johnbradbury
Helper III
Helper III

Help with Gauges - Percentages

Could someone please point me in the right direction on this. I have a column with 5 distinct values, 2 that are considered positive, and 3 that are negative. I need to calculate the total number of positive responses as a percentage of all entries.

 

29ooFCu

1 ACCEPTED SOLUTION

@johnbradbury

% of responses which are positive =
DIVIDE (
    CALCULATE (
        [Total Responses],
        FILTER (
            'Sheet1',
            'Sheet1'[Satisfaction Level] = "Excellent"
                || 'Sheet1'[Satisfaction Level] = "Good"
        )
    ),
    [Total Responses],
    0
)

You can also do this

% of responses which are positive =
DIVIDE (
    CALCULATE (
        [Total Responses],
        'Sheet1'[Satisfaction Level] IN { "Excellent", "Good" }
    ),
    [Total Responses],
    0
)

Hope this helps!Smiley Happy

View solution in original post

4 REPLIES 4
Sean
Community Champion
Community Champion

@johnbradbury

Create a Measure to count all

Total Values = COUNTROWS ( 'Table' )

Then another Measure to Calculate the % Positive

% Positive =
DIVIDE (
    CALCULATE ( [Total Values], FILTER ( 'Table', 'Table'[Value] > 0 ) ),
    [Total Values],
    0
)

After you create the % Positive Measure - select it - go to the Modeling tab and Format it as Percentage

Then create you gauge and add the Measure to the Values

Here's the Result...

% Positive.png

 Hope this helps! Smiley Happy

Thank you for responding so quickly.

 

% of responses which are positive = DIVIDE (CALCULATE ( [Total Responses], FILTER( 'Sheet1', 'Sheet1'[Satisfaction Level] ) ), )

The responses I want to count which are positive are: Excellent, Good

 

 

@johnbradbury

% of responses which are positive =
DIVIDE (
    CALCULATE (
        [Total Responses],
        FILTER (
            'Sheet1',
            'Sheet1'[Satisfaction Level] = "Excellent"
                || 'Sheet1'[Satisfaction Level] = "Good"
        )
    ),
    [Total Responses],
    0
)

You can also do this

% of responses which are positive =
DIVIDE (
    CALCULATE (
        [Total Responses],
        'Sheet1'[Satisfaction Level] IN { "Excellent", "Good" }
    ),
    [Total Responses],
    0
)

Hope this helps!Smiley Happy

Thanks Sean, you're a star!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.