cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

New Member

Double Or function

Weekend =
IF('Calendar'[Day Name]="Sunday"// 'Calendar'[Day Name]="Saturday"
,"Y"
,"N")
While using this formula , only Sunday was reflected as Y but Saturday is N. I need Saturdays and Sundays to be "Y" and rest of the days "N". What's wrong with the above measure? Is it possible without assigning the numbers to the days and only using double or?
Thanks!
2 ACCEPTED SOLUTIONS
Super User

Hi @Roxy_Kdk

IN is better, when you are using OR function

Weekend =
IF('Calendar'[Day Name] IN {"Sunday","Saturday"}
,"Y"
,"N")

or

Weekend =
IF('Calendar'[Day Name]="Sunday" || 'Calendar'[Day Name]="Saturday",
,"Y"
,"N")

Let me know if that works for you

If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the LIKE 👍 button if this comment helps you.

Thanks
Pijush

Helper I

Hello,

Try this where you replace // with || in the formula.

Weekend =
IF(
'Calendar'[Day Name] = "Sunday" || 'Calendar'[Day Name] = "Saturday",
"Y",
"N"
)

3 REPLIES 3
Helper I

Hello,

Try this where you replace // with || in the formula.

Weekend =
IF(
'Calendar'[Day Name] = "Sunday" || 'Calendar'[Day Name] = "Saturday",
"Y",
"N"
)

Super User

Hi @Roxy_Kdk

IN is better, when you are using OR function

Weekend =
IF('Calendar'[Day Name] IN {"Sunday","Saturday"}
,"Y"
,"N")

or

Weekend =
IF('Calendar'[Day Name]="Sunday" || 'Calendar'[Day Name]="Saturday",
,"Y"
,"N")

Let me know if that works for you

If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the LIKE 👍 button if this comment helps you.

Thanks
Pijush

New Member

It worked . Thanks!

Announcements

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.