Forum Discussion
AND IF in conditional column
Hi Board, I believe that I can post this query if i found any similar pattern of query..?? Or else, i can post new one..
I would suggest instead of using a calculated column in the data model, do this in the Power Query Editor where you can use the Custom Column, where you can use multiple conditions.
here is my blog post explaining this: https://www.fourmoo.com/2018/11/27/multiple-conditions-for-a-conditional-column-in-power-query/
- PowerBIBeginer7 years agoHelper V
Hi GilbertQ, Thank You so much for sharing an answer. As well as Thanks for showing me this new website, this too help me to learn a lot.
About solution you have provided, i think that option is available in Power BI Pro option, wherein im using desktop version.
I will try with pro version. Thanks again..
- PowerBIBeginer7 years agoHelper V
Sorry for again. Can you also guide me how do i get Power Bi Pro free login option..
- GilbertQ7 years agoSuper UserHi there
Glad we got this part working.
Could I suggest for your other issue to create a new post?
Easier to keep them separate.
- PowerBIBeginer7 years agoHelper V
Hi,
On your solution, it is not written how to get custom column. I got it now, its difficult me to find that. Okk..
As now im trying in custom column, how do i mentioned this line-
IF[Cond1]="abc" and INT(24*[TAT excluding weekends_holidays])>8, then ">8Hrs" else if ...
INT(24*[TAT excluding weekends_holidays])>8 ??
Can i use INT above? Or directly like
IF[cond1]="abc" and 24*[TAT excluding weekends_holidays])>8 then ">8Hrs" else if ...
- PowerBIBeginer7 years agoHelper V
Hi, I do some random check.
When I'm using single if condition like-
Column = IF('For PwerBi'[Cert type for TAT]="Midterm Routine" && INT(24*'For PwerBi'[TAT excluding weekends_holidays])>8,">8Hrs","NA")im not getting an error and output comes.
But, When im adding one IF condition like-
Column = IF('For PwerBi'[Cert type for TAT]="Midterm Routine" && INT(24*'For PwerBi'[TAT excluding weekends_holidays])>8,">8Hrs",IF('For PwerBi'[Cert type for TAT]="Midterm Routine" && INT(24*'For PwerBi'[TAT excluding weekends_holidays])<8,INT(24*[TAT excluding weekends_holidays]),"NA"))it giving me an error - "Expressions that yield variant data-type cannot be used to define calculated columns."
I dont understand meaning of this error. Why it appears. Someone pls help me in this.