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.
QtyOrPercent =
VAR Selection = SELECTEDVALUE('View Options'[Options])
RETURN
SWITCH(
TRUE(),
Selection = "By Percentage", [QTY %],
Selection = "By Quantity", [QTY]
)
I have this measure above and basically I am switching to either percentage or just the plain sum based on the selected option on the slicer. My issue is I want to add a percentage symbol if the percentage option is selected. Using the Formatting option isn't viable here as it would turn the plain Quantity value into a percentage as well.
What are my options here? I tried doing something like below but it didn't work and my line graph became empty.
QtyOrPercent =
VAR Selection = SELECTEDVALUE('View Options'[Options])
RETURN
SWITCH(
TRUE(),
Selection = "By Percentage", FORMAT([QTY %], "Percent"),
Selection = "By Quantity", [QTY]
)
@RingoSun , I think you should consider the field parameter for this release in May 2022, or the calculation group
Discussed both in Blog and video at the end of blog - https://medium.com/@amitchandak/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9a...
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 |
---|---|
107 | |
100 | |
85 | |
77 | |
66 |
User | Count |
---|---|
120 | |
112 | |
94 | |
84 | |
75 |