Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Yosinator
Frequent Visitor

Any idea why this calculation is not resulting in any values?

Yosinator_0-1668105021901.png

 

It's a combination of an if and switch statement. Wondering if I made any errors anywhere.. 

 

1 ACCEPTED SOLUTION

@Yosinator I see the issue!! You are subtracting 2022-1-31 or resulting in 1990 (the number 1990 which is 1990 days away from the base DAX date of 12/30/1899. You need to do that like DATE(2022,1,31)


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

@Yosinator Just make it 1 SWITCH statement and include your [Course] as another &&


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler 

Hey Greg, I gave that a shot and it still didn't yield any values. 

Strange. 

@Yosinator I see the issue!! You are subtracting 2022-1-31 or resulting in 1990 (the number 1990 which is 1990 days away from the base DAX date of 12/30/1899. You need to do that like DATE(2022,1,31)


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors