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
Jillith
Frequent Visitor

Variance Calculation Not Working (Error thinks there is text)

Good morning

 

Another newbie here...

 

I've started building some financial reporting dashboards in Power BI and want to show the actual vs forecast result for a given month, but when I insert a measure to do this (CYActvsForecast= [CYTotal] - [FcastTotal]), the visual won't display as it thinks there are text values in there somewhere. 

Jillith_1-1596017819451.png

 

As you can see fromt the screenshot below all the values in CYTotal and FcastTotal are numerical, so I don't know what is causing this error! Has anyone seen anything like it before or have any idea how I would go about troubleshooting this?

Jillith_0-1596017650559.png

Many thanks in advance!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Jillith , You are trying to use sum on a text datatype. Please change the data type and try . Or change in power query

 

Data Format New Rib.png

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Jillith , You are trying to use sum on a text datatype. Please change the data type and try . Or change in power query

 

Data Format New Rib.png

Thanks for getting back to me. I forgot to mention that both fields used in the variance calculation are measures - the format section does say it is text but all options are greyed out so I can't change anything...

 

Jillith_0-1596021854536.png

 

OK - I've got this working by adding value () around my measures used in the variance calculation after searching on why measures are formatted as text/how to change them.

 

I couldn't find a definitive answer on why this was happening but it's solved now so thank you. 

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.