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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

matrix displaying data by date using segmentation

I have a timeseries (one year length) for 3 locations, with 1 daly value for each one of them:

Evaldes_1-1649974321629.png

 

Besides, I have 3 events categories:

 

Good: Values lower than 50

Regular: Values between 50 and 100

Bad: Values higher than 100

 

With that in mind, I need to create a matrix showing the number of Good, Regular and Bad events for each location. Something like this (referential values):

 

LocationGood  Regular  Bad  
Zona RM201354
Zona Rancagua 2697
Zona Curico832637

 

To make it even more intresting, the matrix has to be sortable by date, in order to display the number of events in a given time range. I know it can be done somehow using data segmentation:

Evaldes_3-1649976456115.png

 

I can share the data if needed. I would be very grateful if you could indicate me how to achieve this. Thanks in advance!

@GuyInACube @EnterpriseDNA 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Unpivot the locations, so you will get location and values.

https://radacad.com/pivot-and-unpivot-with-power-bi

 

Then you can have new bucket column

Switch(True() ,
[Value] < 50 , "Good" ,
[Value] < 100 , "Regular" ,
"Bad")

 

use that in visual

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Share the download link of your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@Anonymous , Unpivot the locations, so you will get location and values.

https://radacad.com/pivot-and-unpivot-with-power-bi

 

Then you can have new bucket column

Switch(True() ,
[Value] < 50 , "Good" ,
[Value] < 100 , "Regular" ,
"Bad")

 

use that in visual

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Genius! the key was to create the conditional columns after pivot, not before....

https://app.powerbi.com/view?r=eyJrIjoiZWM4OTVkNDEtY2ZlMy00MjI0LThlMGQtZjA3ZDMzZTMxYjM3IiwidCI6ImI3O...

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.