Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Seantb
Frequent Visitor

Dynamic Format Expression - Hover Tooltip rounding not matching column chart data label

Hi all, 

 

I have created a switch measure (refer below) that when put in a slicer allows the user to switch between different measures being shown in a clustered column chart. I've then created a dynamic format expression (the April 2023 update) for the measure so that depending on the measure chosen in the slicer the formatting will change to match. 

 

The Switch Measure to filter in the slicer is: 

MeasuresTable_AllMeasures =
SWITCH(
    [MeasuresTable_SelectedMeasure],
    1, [COUNTPayments_Total],       <-- needs to be formatted in Thousands (e.g. 612856789 would show as 613K)
    2, [%COUNTPayments],             <-- needs to be formatted to in percentage to zero decimal places (62.5% would format as 63%)
    3, 'Measures Table'[SUMPayments_Total],   <-- needs to be formatted in Millions (e.g. 1625789 would format as $2M)
    4, 'Measures Table'[%SUMPayments]          <-- needs to be formatted to in percentage to zero decimal places (62.5% would format as 63%)
)
 
The Switch Measure Dynamic Format Expression is: 
VAR __SelectedMeasure = SELECTEDVALUE(Measures_Selection[Code],1)
RETURN
SWITCH(
    TRUE(),
    __SelectedMeasure = 1, "0,.K",
    __SelectedMeasure = 2, "0%",
    __SelectedMeasure = 3, "$#,.M",
    __SelectedMeasure = 4, "0%"
)
 
The Problem
The formatting is working as required when the 'Measures Table'[%SUMPayments]  &  [%COUNTPayments] measures are chosen in the slicer, however when the [COUNTPayments_Total] or 'Measures Table'[SUMPayments_Total] is chosen, the data labels on the clustered column chart appear as the full value instead of the shortened format in the expression (e.g. 13206 will appear as 13206K) but when i hover over the bar and look at the value of the bar there, it appears in the correct shortened format (e.g. 13206 appears as 13K). I have my data label value field appearing with 'None" for display units and "0" decimal places when it appears like this. If i then change the decimal places to "1" the data label changes to one decimal place as expected, appearing as 13.2K for example. If i change the visual from any of the column visuals to a matrix or table, the values appear with no decimal points, as expected. Can you please advise why this is occuring and how i could display with no decimal points?
 
The tooltip value and value field. 
Seantb_0-1681966683155.png
Seantb_3-1681966881054.png

 

Thank you. 


2 REPLIES 2
iBusinessBI
Kudo Collector
Kudo Collector

Same here. Any solution?

lbendlin
Super User
Super User

You can raise an issue at https://issues.powerbi.com . If you have a Pro license you can consider raising a Pro ticket at https://powerbi.microsoft.com/en-us/support/pro/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.