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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
AliC
Regular Visitor

error message when creating a line chart

Hi all,

Im working on a small GDP project. I've dawnloaded the database from an american platform. 

Ive cleaned the data with Query and created DAX measures for: Population, GDP and GDP per Capita. Al fine, till creating a line chart vizualization with year (X), country (legend) and GDP per capita as Y value. When inserting gdp per capita into the report, i have the following message. Ive checked the error, went in Data view and changed the Format and Data type, but i'm still having the same message. The dax formula was created by the instructor of the project, i just writed it myself into my desktop version and worked. I'm working from a western European windows.

What could be the real problem here? Thanks

BI error.jpg

 BI.jpg 

 

 

6 REPLIES 6
amitchandak
Super User
Super User

@AliC , The data type of year seems like the text to me. And seem like in your formula compared like

 

[Year] =2000

 

or it is whole number and compared like

[Year] ="2000"

 

or some column having text value.

 

The error is because of comparing text with number

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

Untitled 2.png

 

@amitchandak thanks for answer. I changed the format, was something that i missed :)). But unfortunatelly it's not the format of Year that is disturbing the visual. The message is persisting. And this time i've checked the format for all data.

But still,  could be something wrong with the DAX formula? maybe? When creating the formula i had no error.

Untitled.png

 

 

Hi @AliC 

It looks like your [GDP] measure is incorrect.

Maybe try this:

 

GDP = CALCULATE(SUM(Indicators[Value]), Indicators[Indicator] = "NY.GDP.MKTP.CD" )

 

@grantsamborn and @amitchandak  I started completely all over, but this time i also went in Settings, Options and i changed a bit the settings for Global and  Current file. When imported the .csv, i've setted File origin = None. Then i imported to Query and i had no important errors, not anymore. The Year imported according to Local format. But i've changed it back to hole number for the purpose of creating the GDP measures. This time the slicer succeded without errors

@grantsamborn thanks for answer. I've changed the formula and was taken as correct. But this didn't change the situation. I will just restart the project and recheck the data, including the local settings, etc. Within this data i had previously another complex situation with the Date which i couldn't integrate it correctly  into the model, so prior to this i had to manually concatenate into excel for having correct data

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors
Top Kudoed Authors