cancel
Showing results for
Search instead for
Did you mean:
New Member

## Calculating Quartile Based on values in visual

I have a table which has some zip codes and their corresponding population. I am using a visual where i want to show  which zip falls under which quartile based on their population. The zips showing in that visual are filtered based on a slicer. So instead of using the population within the whole table, I want the quartile to be calculated based on population of ONLY the zips within that visual. This is the formula i used but I dont think it is showing the right data

Q Population = var high = PERCENTILE.INC('Calculated'[POPULATION],.75) Var mid = PERCENTILE.INC('Calculated'[POPULATION],.50) var low = PERCENTILE.INC('Calculated'[POPULATION],.25) return if(('Calculated'[POPULATION])<= low, "Q1", IF(AND(('Calculated'[POPULATION])<= mid,('Calculated'[POPULATION])>low), "Q2", if(and(('Calculated'[POPULATION]) <=high,('Calculated'[POPULATION])> mid ), "Q3","Q4")))

2 REPLIES 2
New Member

@Jihwan_Kim  You understood my problem right and I am able to understand the approach you are taking but i think because of my data size or maybe because of the number of other criterias, it is taking time to create rank.

Community Champion

Hi, @Shalu2283

Please correct me if I wrongly understood your question.

please check the below picture and the sample pbix file's link down below, whether it is what you are looking for.

all measures are in the sample pbix file.

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

Best regards, JiHwan Kim

Linkedin: https://www.linkedin.com/in/jihwankim1975/

Twitter: https://twitter.com/Jihwan_JHKIM

## Helpful resources

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.

#### Check it out!

Click here to read more about the July 2021 Updates

#### Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

#### Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors