The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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