Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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
@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
@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.
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
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.