Forum Discussion
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
- MattAllingtonCommunity 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.
- v-qiuyu-msftCommunity 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- AnonymousNot 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".

- AnonymousNot applicable