cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Dynamically Change Format In Visual

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:

 

CompanyDateKeyValue
Company ANov-19Sales$12.50
Company ADec-19Sales$15.50
Company ANov-19Units2
Company ADec-19Units4
Company BNov-19Sales$20.50
Company BDec-19Sales$25.00
Company BNov-19Units4
Company BDec-19Units5

 

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

5 REPLIES 5
Super User IV
Super User IV

Re: Dynamically Change Format In Visual

@bmk266 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" 
)

 






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.





Highlighted
Regular Visitor

Re: Dynamically Change Format In Visual

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?

 

 

Highlighted
Super User IV
Super User IV

Re: Dynamically Change Format In Visual

@bmk266 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






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.





Highlighted
Regular Visitor

Re: Dynamically Change Format In Visual

that's crazy you can't dynamically change formatting on a visual.  such a basic feature.  thanks though.

Highlighted
Community Support
Community Support

Re: Dynamically Change Format In Visual

Hi @bmk266 ,

 

I sincerely invite you to submit your idea if you want:

https://ideas.powerbi.com/.

 

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.

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution to help the other members find it.

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Super Users of the Quarter - Q2 2020

Super Users of the Quarter - Q2 2020

Who are our Super User Superstars? Who made it to the top of the leaderboards? Get the answers!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Community Summit Australia – Join Online!

Community Summit Australia – Join Online!

Be a part of the leading Microsoft Business Applications digital event, curated for the APAC community.

Top Solution Authors