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

Helper II

## switch with in dax

Hello Community,

can someone please tell me what is wrong with first image below?

image 2 works fine

thank you

Zoey

3 ACCEPTED SOLUTIONS
Super User

Try

FYQ = SWITCH(TRUE(), 'Date'[Month No] IN {7,8,9}, "Q4")

Proud to be a Super User!

Solution Sage

Hi,

FYQ= SWITCH ( Date[Month No], 1, "Q1", 2, "Q1", 3, "Q1", 4, "Q2", 5, "Q2", 6, "Q2", 7, "Q3", 8, "Q3", 9, "Q3", 10, "Q4", 11, "Q4", 12, "Q4", "Unknown" )

OR

FYQ= SWITCH ( TRUE(),

Date[Month No]>=7 && Date[Month No]<=9, "Q3",

Date[Month No]>=1 && Date[Month No]<=3, "Q1",

Date[Month No]>=4 && Date[Month No]<=6, "Q2","Q4" )

Helper II

Perfect!! thank you

4 REPLIES 4
Solution Sage

Hi,

FYQ= SWITCH ( Date[Month No], 1, "Q1", 2, "Q1", 3, "Q1", 4, "Q2", 5, "Q2", 6, "Q2", 7, "Q3", 8, "Q3", 9, "Q3", 10, "Q4", 11, "Q4", 12, "Q4", "Unknown" )

OR

FYQ= SWITCH ( TRUE(),

Date[Month No]>=7 && Date[Month No]<=9, "Q3",

Date[Month No]>=1 && Date[Month No]<=3, "Q1",

Date[Month No]>=4 && Date[Month No]<=6, "Q2","Q4" )

Helper II

Thank you this is great!

Zoey

Super User

Try

FYQ = SWITCH(TRUE(), 'Date'[Month No] IN {7,8,9}, "Q4")

Proud to be a Super User!

Helper II

Perfect!! thank you

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.

#### Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

#### Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors