The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all,
I have a switch true query that returns whole numbers, decimals numbers and currency. This is causing issues with data formatting in the visuals and tooltips. They are all defaulting to 2 decimal places.
When hovering over the data I'd like the pop up to show the data as formatted in the measure howeverI'm unsure what the best way to deal with this is.
Hi, @Anonymous
I don't really get what you mean by "switch true query". Could you clarify the code or your situation, maybe some screen shots?
Thank you
Paul,
Best
Hi Paul,
It is a switch formula which links to different reports. Similar to the below:
Column 2 =
SWITCH(TRUE(),
Dates[Date]>01/01/2007 && Dates[Date]<08/30/2008,"2007/2008",
Dates[Date]>08/31/2008 && Dates[Date]<08/30/2009,"2008/2009",
Dates[Date]>08/31/2009 && Dates[Date]<08/30/2010,"2009/2010",
Dates[Date]>08/31/2010 && Dates[Date]<08/30/2011,"2010/2011)
Hi, mish
I have made some tests with the switch true function using a random sample, however it does not appear to have the decimal issue like you do. Maybe you can have a look at the data types of the used columns, and the decimal format underneath.
Best,
Paul
Hi Paul,
The data I provided was sample data, however imagine one data source was currency and one was volume. That is where the issue lies - PowerBI does not format the data based on its source. And if you try to add a format function, it switches to text which is useless with bar graphs. Unfortunately I do not believe there is a way to do what I wanted, yet.
Thank you.
Hi,
you colud try setting your measure as text and formatting values into the switch functions
Regards
Lorenzo
Unfortunately the data is presented as a graph so text wouldn't work. It seems currently there just isn't a way to do this?
User | Count |
---|---|
79 | |
78 | |
37 | |
34 | |
31 |
User | Count |
---|---|
93 | |
81 | |
59 | |
49 | |
49 |