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
Anonymous
Not applicable

Calculated Column with IF statement not showing correct values

Hi,

 

I just run into a problem. I need to create a calculated column, that looks at the value in column Currency and returns a correct exchange rate measure. Basically the funtion looks like following:

 

Column1 =
IF(Table[Currency] = "USD"; [CurrentEURUSD] ; 1)

Problem is that sometimes when the Currency column has a value USD, the calculated column shows the right value (value of the measure) but sometimes it just returns blank. Any idea what may cause this? I tried to use the trim function in the Query editor to ensure there are no additional spaces but it didn't help.

3 REPLIES 3
v-lili6-msft
Community Support
Community Support

Hi@ kosti_h 

After my research, cause of returning blank is not format of the column Currency, It should be something wrong in the related column of the measure [CurrentEURUSD].

For example:

My measure is: Measure = SUM(Table1[Rate])

And the result

5.png

But when I add the data in column Rate of first row, the blank will disappear.

6.png

Please check the data and the measure or you can share your pbix for us. You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.

 

 

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Stachu
Community Champion
Community Champion

are there any other non printable characters in the field? e.g. line break etc., you may need to replace those as well



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Anonymous
Not applicable

I actually figured out that this had something to do with my table relationships with the DateTable. When there was no connection active, the function worked out just fine. I have to investigate more on this.

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.