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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Maheshguptaz
Helper III
Helper III

Segments using DAX

Hello,

I was trying to create quadrants using DAX on Salary and I was successful with it but when I apply a country filter, it doesn't adjust based on the selection and gives me only 1 segment.

I'd like to see the DAX show 4 segments of the quadrant even with the country selection.

Here's the DAX code:

Segment =
VAR _MaxMin =
DIVIDE(
    MAX('Active employee list Global'[Total_Base_Pay_Annualized_EUR_-_Amount]) - MIN('Active employee list Global'[Total_Base_Pay_Annualized_EUR_-_Amount]), 4)
RETURN
IF('Active employee list Global'[Total_Base_Pay_Annualized_EUR_-_Amount] <= _MaxMin, "Q1",
IF('Active employee list Global'[Total_Base_Pay_Annualized_EUR_-_Amount] <= _MaxMin * 2, "Q2",
IF('Active employee list Global'[Total_Base_Pay_Annualized_EUR_-_Amount] <= _MaxMin * 3, "Q3",
IF('Active employee list Global'[Total_Base_Pay_Annualized_EUR_-_Amount] <= _MaxMin * 4, "Q4"))))

without Country Selection:

Maheshguptaz_0-1715837212606.png


With Country Selection:

Maheshguptaz_1-1715837242144.png

Any help on this would be really helpful.

Regards,
Mahesh

4 REPLIES 4
Anonymous
Not applicable

Thank @Jihwan_Kim  for your prompt reply.

Hi @Maheshguptaz  ,

Based on the information you have provided, can you provide some example data such as detailed data (without sensitive information) and your desired output. This would allow us to better reproduce and solve the problem you are experiencing.

 

How to Get Your Question Answered Quickly - Microsoft Fabric Community

If it does not help, please provide more details with your desired out put and pbix file without privacy information.

 

Best Regards,

Ada Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Maheshguptaz
Helper III
Helper III

Hi All,

 

I'd need this segmentation done based on Country i.e., if I select India, I'd need to see all 4 quarters for India. If no selection is made, I should see the plotting on Global level.

Jihwan_Kim
Super User
Super User

Hi,

Please correct me if I misunderstood, but [Segment] that you created above is calculated column, am I right?

If it is a calculated column, it will not work dynamically based on the selection of the country.
If you can try to create that as calculated measure, I believe it will works dynamically.

Thank you.


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.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Hello @Jihwan_Kim ,

Yes, it's a calculated column. It can't be done in a measure as I'd need them to be labelled and used as an Axis.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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