The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi, i am new to Power Bi.
while using the IF Statement, i am getting an error like this yield variant data-type cannot be used to define calculated columns
Calculation is: IF(AND([Completion Status]="Open",[Status]="MD Ops Review - Delete"),Sheet1[NET_DAY],"")
Can any one help me on this.
Thanks in Advance!
Solved! Go to Solution.
Hi @sureshdam18,
I think you are try to use both number value and text value in one calculate column so power bi can't auto analysis data type of this calculated column.
Maybe you can try to use 0 to replace "" part to keep similar data type or modify the column type to text.
Column= IF ( AND ( [Completion Status] = "Open", [Status] = "MD Ops Review - Delete" ), Sheet1[NET_DAY], 0 )
Regards,
Xiaoxin Sheng
Hi,
I get the same error
I use column as
Count = Var A = calculate (countrows (table name)) Return if (isblank (A),"NA",A)
Thanks
HI to all, may I know what seems to be the problem here?? The format is right but still get this king of error
Hi, I have the same issue but I don't want to replace with zero because I want to have a measure based on that column (i.e. Days of travel CLEAR).
City | Days of travel | Days of travel CLEAR |
London | 20 | =if(City<>"",Days of travel,"") |
-4500 | ||
London | 10 |
Hi @sureshdam18,
I think you are try to use both number value and text value in one calculate column so power bi can't auto analysis data type of this calculated column.
Maybe you can try to use 0 to replace "" part to keep similar data type or modify the column type to text.
Column= IF ( AND ( [Completion Status] = "Open", [Status] = "MD Ops Review - Delete" ), Sheet1[NET_DAY], 0 )
Regards,
Xiaoxin Sheng
so how can i do it ?
Thanks- I had the same issue and it was solved.
Hi,
May I ask how did you solve the issue?
How about my case ?
Please suggest me
[Expressions that yield variant data-type cannot be used to define calculated columns.]
truecondiation = IF(ISM[OData_{CH} Recommend0]=BLANK(),ISM[OData_{RNSP} TSS_x00],ISM[OData_{CH} Recommend0])
Hi,
I get the same error with today(), Any suggestions on how to fix this error?
cDate = IF([SharePointColumnD]="","",
IF([ICColumn]="",NOW(), [ICColumn]))
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
110 | |
78 | |
76 | |
41 | |
37 |
User | Count |
---|---|
157 | |
113 | |
64 | |
60 | |
55 |