Forum Discussion
Column Name in Chart Title
Hi I need to build a 2-part measure that I want to use as a chart title.
I'm having problem with the second part b) so any help is much appreciated.
My title measure is a concatenation of two parts:
a) selected measure name - this is done using this formula:
= SELECTEDVALUE('Warranty Measures'[Measure])
It works because I first created a list of measures in a separate table and hooked them together into a single switch measure according to this post: https://www.thedataschool.com.au/danica-hui/switching-measures-and-titles-dynamically-in-power-bi/
b) column name used as bar chart axis. For example, let's call it "Models". I could hard code it, but it would be nice to use this formula in multiple charts if possible and see it adjusting to each column name.
Any ideas?
Here is my measure selector, chart and snapshot from visualization pane:
The title should be: "Claim Count by Model #"
- Anonymous5 years ago
Hi Krzysztof_Hyla,
It sounds like you want to achieve fully dynamic measure calculations based on selection.
If that is the case, I'd like to suggest you take a look at coalition groups and SELECTEDMEASURENAME, SELECTEDMEASURE functions.Regards,
Xiaoxin Sheng
3 Replies
- veenashenolikarHelper V
You could try using the function button in the Title setting of the chart as below and then use the same measure in in a) you have mentioned above to create a title that varies dynamically.
ChartTitle = SELECTEDVALUE('Warranty Measures'[Measure]) & "by Model #"
If this helps solves your issue, please mark my reply as a solution
Regards,
Veena Shenolikar
- Krzysztof_HylaHelper II
Yes, but the thing is I don't want to hard-code "by Model #" in the formula.
I would like for the let's call it [MEASURE_B] to take value from the name of the column "Model"
So that it will change dynamically when I apply this title formula for another chart.
ChartTitle = SELECTEDVALUE('Warranty Measures'[Measure]) & "by " & [MEASURE_B]"
- AnonymousNot applicable
Hi Krzysztof_Hyla,
It sounds like you want to achieve fully dynamic measure calculations based on selection.
If that is the case, I'd like to suggest you take a look at coalition groups and SELECTEDMEASURENAME, SELECTEDMEASURE functions.Regards,
Xiaoxin Sheng