Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Guys I need IF statement in M based on this example table:
The logic is:
when [Column1]="Value1" or [Column1]="Value2" or [Column1]="Value3" then 1
when [Column1]="Value4" and Date is in current year then 1
else 0
Solved! Go to Solution.
Hi @Anonymous
= if [Column1]="Value1" or [Column1]="Value2" or [Column1]="Value3" then 1
else if [Column1]="Value4" and Date.Year([Date]) = Date.Year(DateTime.LocalNow()) then 1
else 0
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Hi @Anonymous
= if [Column1]="Value1" or [Column1]="Value2" or [Column1]="Value3" then 1
else if [Column1]="Value4" and Date.Year([Date]) = Date.Year(DateTime.LocalNow()) then 1
else 0
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers