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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

IF IS BLANK is false then the return the same value

Hi I have this formula, 

Tipo cambio 2 = IF(ISBLANK(ItemVta[Tipo Cambio]),SUM('Tipo cambio bcra'[Column2]),ItemVta[Tipo Cambio])
 
It returns this error 
Expressions that produce Variant data types cannot be used to define calculated columns.
 What i want to do is, if the value is blank so make this calculation SUM('Tipo cambio bcra'[Column2]), but if it isn't blank , return the same value of the colum ItemVta[Tipo Cambio].

Am i clear? thanks! 
Status: New
Comments
v-chuncz-msft
Community Support

@luchitogiuse 

 

This can be caused by data type mismatch. You may convert data type by CONVERT function. For any question about data shaping, modeling, and report building in the Power BI Desktop app, feel free to post a new message in Desktop forum.

luchitogiuse
Frequent Visitor

@v-chuncz-msft 
Thanks for your help! It worked doing this! 

 

Tipo cambio 2 = CONVERT(IF(ISBLANK(ItemVta[Tipo Cambio]),SUM('Tipo cambio bcra'[Column2]),ItemVta[Tipo Cambio]),CURRENCY)