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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Leah-H
Frequent Visitor

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.

 

PBI Rounding Question.png

Any suggestions?

1 ACCEPTED SOLUTION

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.Smiley Happy

 

Regards

View solution in original post

13 REPLIES 13
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. 

format.JPG

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.

 

Phil_Seamark
Employee
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")

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

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

 

Math

29.21599999999998

29.2

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


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Phil I hope TRUNC works - however I would've thought ROUND would also work Smiley Happy

 

Let's see...

I tried it here and worked for me.  


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Thanks for the suggestions! It's true that I need the variable to be numeric since I'll be doing calculations on it, and then the issue here is cropping up due to the automatic display of the summarized numeric value in the tooltip. Using TRUNC is a good suggestion, but it does not seem to solve the issue for me. Is there a setting you're able to switch that might explain why it's working on your end and not mine? 

 

As of now ROUND and TRUNC are both exhibiting the same behavior for me. And I'd prefer to use ROUND over TRUNC since that would give me more accurate averages when summarized. 

 

(I recreated and saved the workbook this time, hence the different average score)(I recreated and saved the workbook this time, hence the different average score)

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.Smiley Happy

 

Regards

Anonymous
Not applicable

Unfortunately this is something that is unbereable with models that have thousands of measures.

I think Power BI team should work on a way to allow custom formatting also on tooltips, the same way they are possible in measures etc...

 

 

So maybe try this...

 

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

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

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


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Sean
Community Champion
Community Champion

How about TRUNC

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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