cancel
Showing results for
Did you mean:
Helper III

## Percent difference based on text values

I could use some guidance on how to get a measure to show the percentage difference between text values in a column "SUBREGION". I have created a measure to count each text value that equals "M COUNTY" which is a resident but now I need to get the percent difference between that vs all other subregions who are non residents.  I appreciate any help on this!

CountResident = CALCULATE(COUNT(TABLE[Subregion]),'TABLE'[Subregion] = "M County")

GOAL

Percent difference

RESIDENT (M COUNTY) vs NON RESIDENT (ALL OTHER SUBREGIONS that are not M COUNTY)

1 ACCEPTED SOLUTION
Responsive Resident
Use this then,
Result =
VAR CountResident = CALCULATE(COUNT(TABLE[Subregion]),'TABLE'[Subregion] = "M County")
VAR AllCountResident = CALCULATE(COUNT(TABLE[Subregion]),'TABLE'[Subregion] <> "M County")
RETURN
DIVIDE (CountResident, NonCountResident, 0)
6 REPLIES 6
Responsive Resident
I think it is fairly simple. Take the count of Residents and Divide them with the all-residents
Use below
Result =
VAR CountResident = CALCULATE(COUNT(TABLE[Subregion]),'TABLE'[Subregion] = "M County")
VAR AllCountResident = CALCULATE(COUNT(TABLE[Subregion]),ALL(TABLE))
RETURN
DIVIDE (CountResident, NonCountResident, 0)
Helper III

Thank you for the prompt response and help! I did use your formula but I don't think it showing the correct percent? Shouldn't it be like 89%? Also do you know how to show the card as a percent?

Responsive Resident
Select this measure and go to modeling in the top ribbon and choose percentage as data type.
Do you want the percentage of M Residents or the difference between M Residemts and Non M Residents
Helper III

Thank you! I need percent of M County residents vs non residents (all other). So I need to see percentage of M County (residents) who registered against the non-residents.

Responsive Resident
Use this then,
Result =
VAR CountResident = CALCULATE(COUNT(TABLE[Subregion]),'TABLE'[Subregion] = "M County")
VAR AllCountResident = CALCULATE(COUNT(TABLE[Subregion]),'TABLE'[Subregion] <> "M County")
RETURN
DIVIDE (CountResident, NonCountResident, 0)
Helper III

Awesome it worked! Thank you so much for all your help

Announcements

#### 2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.