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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
kirby96
New Member

Created a measure, but cannot change the visualization

Hello-

 

I've created a new measure that calculates a weighted average calc on two columns in my dataset. When I create a table visualization of this measure, the calc is working fine, but I'd like to change the visualization to a chart (line or bar or something).

 

However, when I select any visualization other than a table, nothing is displayed. Am I missing something basic, or is there something about my calc that is precluding seeing the results in a chart?

 

Thanks!

1 ACCEPTED SOLUTION

Solved:

 

It appears that the FORMAT function that took my SUMX formula as an argument limited the results to text, although I was using a format of "0.00%" (i.e. it's somewhat counterintuitive, but I'm guessing the quotes suggest it remains text).

 

When I removed the FORMAT function and then changed format of the visualization itself (in the modeling tab), it worked just fine.

 

Is that the correct intrepretation of what happened here (I'm pretty new)?

View solution in original post

4 REPLIES 4
bsas
Post Patron
Post Patron

Hi,

 

Could you provide screenshots of your table(s)?

Solved:

 

It appears that the FORMAT function that took my SUMX formula as an argument limited the results to text, although I was using a format of "0.00%" (i.e. it's somewhat counterintuitive, but I'm guessing the quotes suggest it remains text).

 

When I removed the FORMAT function and then changed format of the visualization itself (in the modeling tab), it worked just fine.

 

Is that the correct intrepretation of what happened here (I'm pretty new)?

FORMAT() converts a value to text according to the specified format. It is specifically intended to return a text data type according to the documentation.

 

Edit: Curse you @TomMartens for being quicker on the draw!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hey,

 

yes that is expected due to the fact, that the DAX function FORMAT() returns a string:

https://msdn.microsoft.com/en-us/library/ee634924.aspx

 

If the result of FORMAT(...) can be interpreted as a numeric value you might give this a try

VALUE(FORMAT(...,theformat))

 

Regards 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.