Forum Discussion
IF function doesn't work
Hi all!
I meet a strange error in my PBI file. This file was created last year and all worked perfect. Today I opened it and see the error in following function:
11 = var q = 0,7 RETURN IF( 'table'[Column] > q, "1", "2" )
The error is: "The following system error occurred:". Without any details.
I'm using the latest version of Power BI Desktop. Regional settings - English. Windows language - Engling.
Can anybody help me please?
Thanks in advance!
10 Replies
- amitchandakSuper User
Seems like . or , or ; issue
Try like
11 = var q = 0.7
RETURN IF( 'table'[Column] > q, "1", "2" )OR
11 = var q = 0,7
RETURN IF( 'table'[Column] > q; "1"; "2" )- KaterinaHelper I
amitchandak Hi!
I've tried this, but it didn't help 😞
I had simmilar error in my Calendar function and resolve this issue by adding spaces before coma in the formula:
Calendar= CALENDAR(DATE(2012 ,1 ,1),DATE(2019 ,12 ,31))Without extra spaces this formula didn't work.But I can't resolve the issue with IF formule 😞- KaterinaHelper I
very strange, but this formula is work:
11 =var q = VALUE("0,7")RETURNIF('Продукты'[Заполненность склада]>q ,"1" ,"2")But it is not a good idea to add Value function allways when I need to work with Decimal 😞