Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have three measures
Measure 1: a growth measure expressed as a percentage
Measure 2: a sales measure expressed in $
Measure 3: an if statement that works out if to show measure 1 or measure 2 based on a slicer.
Ultimately I use a slicer to determine whether to show sales or growth.
The issue is that the formatting on measure 3 is what applies to the output rater than respecting the formatting of measure 1 or 2. I can see why this would be the ideal case but it isn't great for me.
At the moment I have measure 3 set as a decimal number so the growths are expressed as a decimal (0.2 for 20%).
I understand I can add FORMAT(Measure2,"0%") however then the output is as text and I cannot put it on a graph.
Has anyone any ideas on how to have measure 3 show a percentage that can be graphed or a $ that can be graphed based on where the if statement comes from?
The goal here is to enable users to use a slicer that will change the chart to show the sales as a line or the growth as a line.
Solved! Go to Solution.
Hi @User7664
You can use calculation Groups to do this. @MattAllington has written about it here
Dynamic Formatting of Switch Measures - Excelerator BI
Regards
Phil
Proud to be a Super User!
Hi @User7664 ,
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it.
Best Regards,
Eyelyn Qin
Hi @User7664 ,
According to my understanding, you want to display xx% or $xx in Line chart based on selected value in slicer, right?
I think @PhilipTreacy has provided an effective method, or you could try this(but with some minor flaws):
Measure1= IF(MAX('ForSlicer'[Value])="growth", <condition>)
Measure2=IF(MAX('ForSlicer'[Value])="sales", <condition>)
Put Measure1 to Values and Measure2 to Secondary Values after changing the format in Tools pane,
and disable Y-axis:
Here is the pbix file.
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @User7664
You can use calculation Groups to do this. @MattAllington has written about it here
Dynamic Formatting of Switch Measures - Excelerator BI
Regards
Phil
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
100 | |
81 | |
70 | |
62 |
User | Count |
---|---|
148 | |
116 | |
104 | |
90 | |
65 |