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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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
Anonymous
Not applicable

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

 

Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

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.

 

Picture1.png

 

 

https://www.dropbox.com/s/2alfic9ybnywva8/shalu.pbix?dl=0 

 

 

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 accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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