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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

How to create a visualization for a measure

I have run into a brick wall. I'm new to Power BI, but I really would like to be able to show my users something. Here goes: I need to be able to create a visualization that will update based on a measure when slicers are applied. Specifically, I have a list of electrical outages by customer. I want to know how many outages that customer experiences when a slicer is applied.

 

I have created a measure that counts the number of outages a customer has in the customer-outage listing and it works great when slicers are applied to limit the outages based on type of outage, but I cannot use that measure in a visual like a pie cart. I also made a calculated column based on the measure and it correctly displays the total number of outages the customer has seen, but never re-calculates once the slicer is applied.  I used the calculated column in the pie chart, but I would rather have used the measure. My measure is named "Filtered.CEMI-x". My calculated column is named "CEMI-x".

 

Does anyone know how to use a measure in a visual?

8 REPLIES 8
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous,

 

If @MattAllington's suggestion doesn't meet your requirement, please share some sample data and screenshots about the expected results, so that we can test it in our environment.

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

My problem is that I want to use the new measure, "Filtered.CEMI-x" as a split for the pie sections. I want to know how many customers have seen exactly 1, 2, 3, 4, ...x interruptions based on the filtered data. I don't want to use the measure or the calcuated column in the values section of the visual.  Power BI won't let me place my measure (that updates when users select various slicer configurations) as the "Legend" or "Details" field of the pie chart. I really don't care to use the calculated column because the measure is what gives me the breaks I want on the data, but I can't get Power BI to allow measures to be used as splits in visuals.   Please see the screen shot that shows a slicer selection that has changed the measure "Filtered.CEMI-x" from it's orginial values shown in the calculated column "CEMI-x".

 screen shot

Hi @Anonymous,

 

According to your description, it seems that you want to place a measure in Legend or Details property within a pie chart visual, right?

 

The measure returns the aggregated value from a expression, so it can't be used for categorizing pie chart values. In your scenario, you can consider to convert the measure Filtered.CEMI-x to a calculated column, then place this column in Legend or Details property.

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Your suggestion is exactly what I had already done and it doesn't change when slicers are applied.  The column I made was called "CEMI-x" and is in the screen shot I provided.  It is not correct when a user filtered the data based on a slicer.  In the screen shot, I want to show CEMIs of 2 and 3, not 10 and 11 like the pie chart shows.

 

Is there anything I can do to get this corrected?

Hi @Anonymous,

 

Would you mind sharing .pbix file for our analysis? So that we can try to check if the requirement can be achieved.

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

It's ok - I've been working with Oakwood Systems out of Kansas City and they have told me what I want to do it not possible. I can't seem to place a measure into a visual to break the data on it. Instead, I'll work with my users to give them a few likely scenarios and build those filtered views in SQL Server and then serve those up to them in different visuals. Thanks for trying to help me.

Anonymous
Not applicable

2016-08-19 19_53_46-CEMIs CYR draft - Power BI Desktop.jpg

MattAllington
Community Champion
Community Champion

This is not the best forum for this question - you really should ask it in the Desktop forum.

 

Calculated columns to not react to slicers.  This is one reason you should avoid using them unless there is a specific need.  Read my article on this here http://exceleratorbi.com.au/calculated-columns-vs-measures-dax/

 

You don't say what the issue is when you place your measure that counts outages that is preventing you adding it to a pie chart.  (I hate Pie charts by the way, but that is another story 🙂  

 

If you have a measure that counts, you can add it into the values section of any visual.  You then need to add some other column to split the data.  For example you could add  "type of outage" column to the columns on a bar chart or also to the pie chart.  But if you then put a slicer on the same column and select a single value, then your pie chart will only have a single value.  If you multi select more than 1 item in your slicer, then it will work.



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors