Forum Discussion

Leah-H's avatar
Leah-H
Advocate I
9 years ago
Solved

Adjust numeric formats for aggregates inside tooltip

I've been looking around to see if this question has already been answered but I'm not finding it if it is. I'm trying to set the nunber of decimal places for aggregated columns in the tooltip. The challenge here is that I'm connected to a SSAS Tabular model, so the usual tactic of adjusting the column's format for decimal places through the Modeling>Formatting menu is not available to me. I've tried using the ROUND() function as well as the FORMAT() function, but using FORMAT() seems to convert the value to text so it can no longer be aggregated, and ROUND() is not affecting Power BI's internal calculation which shows up in the tooltip at all. 

 

Here is a screenshot where I've simulated the basic challenge. I want the average score to be rounded to one decimal place in the tooltip.

 

Any suggestions?

  • Hi Leah-H,

     

    Based on my test, without the option to use the Format option under Model tab, I was also not able to affect Power BI's internal calculation which shows up in the tooltip by using ROUND or TRUNC in this scenario.

     

    In addition, as the idea for supporting DAX measures against Tabular models is alread started, I think the Format option under Model tab will also be available against Tabular models when that idea is complete.:smileyhappy:

     

    Regards

14 Replies

  • Phil_Seamark's avatar
    Phil_Seamark
    Microsoft Employee

    You can create a new measure just for the Tooltip that uses the FORMAT function.  You'll see here I've set the decimal places to 2 places.

     

    Try this

     

    My Tool Tip = FORMAT(
    					CALCULATE(
    						AVERAGE('PERSIST WeatherReading'[baro])
    						)
    				,"#,000.00")
    • Phil_Seamark's avatar
      Phil_Seamark
      Microsoft Employee

      So maybe try this...

       

      My Tool Tip = FORMAT(
      		CALCULATE(
      			< your calc here > 
      			)
      		,"#,000.0")

       

      • Phil_Seamark's avatar
        Phil_Seamark
        Microsoft Employee

        I would have thought text for your Tool Tip would be fine

    • Sean's avatar
      Sean
      Community Champion

      Phil_SeamarkYes but above the Toolip Measure you'll still see that Number!

       

      Math

      29.21599999999998

      29.2

      • Phil_Seamark's avatar
        Phil_Seamark
        Microsoft Employee

        Oh yeah, I see what you mean now.  I reckon Sean is on the money with the TRUNC function.  Works for me! :)

  • dpilats's avatar
    dpilats
    Frequent Visitor

    Hi, 

    SSAS it is an easy thing. When measure is created it is always automatically created in General format = show data with decimals.  Change all measures to type "Whole Number" and then publish solution again. 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi dpilats,

       

      I dont think that is what we are debating here. The idea would be to have the possibility to have a "global" format but with the hability to change it in some cases like specific reports, tooltips etc.