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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Anonymous
Not applicable

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

@Anonymous , 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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , 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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

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

 

Anonymous
Not applicable

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.