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
peanutzzzc
Regular Visitor

Colouring data points in quadrant graph according to quadrant

Hi all, I am creating a quadrant graph and would like to colour my data points to their quadrant. 

 

My data is a table of transactions, consisting of dates, customers, weight, and rate per kg. Rate per kg is calculated by dividing total charges by weight. 

 

pbi table.PNG 

 

 The Quadrant graph shows median of weight and median of rate per kg by customer. Slicers for the graph are dates and customer. 

 

 I came across this post which is rather similar to my question. https://community.powerbi.com/t5/Desktop/color-quot-bubbles-quot-by-computed-category/td-p/25220

 

 Do I need to create a table to colour data points in quadrant graph according to their quadrants? Is this supported in Power BI desktop?

If so, how do I create a table with each customer's:

1. median weight

2. median rate per kg

3. quadrant

such that their values change according to my slicers

 

If anybody has a solution, please post it here. Your answers will be really helpful.

 

 

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

Hi peanutzzzc,

 

Based on your description, you want to achieve median of weight and median of rate per kg by customer, right?

 

You can create a measures using DAX formula below:

median weight = calculate(median('Table'[Weight]), ALLEXCEPT('Table', 'Table'[Customer]))

median of rate per kg = CALCULATE(MEDIAN('Table'[Rate per KG]), ALLEXCEPT('Table', 'Table'[Customer]))

 

Capture.PNG

 

Regards,

Jimmy Tao

View solution in original post

1 REPLY 1
v-yuta-msft
Community Support
Community Support

Hi peanutzzzc,

 

Based on your description, you want to achieve median of weight and median of rate per kg by customer, right?

 

You can create a measures using DAX formula below:

median weight = calculate(median('Table'[Weight]), ALLEXCEPT('Table', 'Table'[Customer]))

median of rate per kg = CALCULATE(MEDIAN('Table'[Rate per KG]), ALLEXCEPT('Table', 'Table'[Customer]))

 

Capture.PNG

 

Regards,

Jimmy Tao

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.