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'm confused on how to use best practices with a slicer. I want the users to essentially be able to choose Units or Sales in a slicer where Key is selected for Slicer. This would then flow thru to a visual that would be a bar chart with a yoy line. I can create the yoy measure for both, so thats not the issue. However, the problem I'm having is that sales is in dollars and units is not. I have my data structured like this:
Company | Date | Key | Value |
Company A | Nov-19 | Sales | $12.50 |
Company A | Dec-19 | Sales | $15.50 |
Company A | Nov-19 | Units | 2 |
Company A | Dec-19 | Units | 4 |
Company B | Nov-19 | Sales | $20.50 |
Company B | Dec-19 | Sales | $25.00 |
Company B | Nov-19 | Units | 4 |
Company B | Dec-19 | Units | 5 |
Is it really not possible to dynamically change the format in a visual?
Has this been solved?
https://community.powerbi.com/t5/Desktop/Dynamically-format-a-measure-as-or/td-p/157192
Thank you in advance
@Anonymous you can sure use but it will be string
Sum =
VAR __selectedValue = SELECTEDVALUE ( Table[Key] )
VAR __sum = SUM ( Table[Value] )
RETURN
IF ( __selectedValue = "Units", FORMAT( __sum, "General Number" ),
FORMAT ( __sum, "Currency"
)
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
thank you - but as you mentioned it is a string, so you can only put it in a tooltip.
So does this mean there is no way to dynamically change the format in a visual?
And if not, can we remove the Value from the tooltip so all it sees is the string?
@Anonymous correct, you cannot use it in visual like bar chart etc but you can surely use it in Card Visual, Yes you can use it in tooltip, and to remove actual value from tooltip, you can create custom tooltip page that allows you to choose whatever you want to show on tooltip
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
that's crazy you can't dynamically change formatting on a visual. such a basic feature. thanks though.
Hi @Anonymous ,
I sincerely invite you to submit your idea if you want:
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |