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
RustyNails
Helper III
Helper III

DAX Formula for current end of quarter date

Hello all,

 

I have a simple request. I want to count the number of items that are projected to ship before the end of current quarter. Is there a formula that will allow for something like:

 

Forecast = Calculate(Count(Product[Item]), product_ship_date <= EndOfCurrentQuarterDate(Today()))

 

So if use Forecast today it should give me the count of all items that are planned to ship on or before 6/30/2018. And then in Q3, it should bring everything that's planned for Q3 and so on.

 

There is EndOfQuarter function, but it's not accepting Today() or Now(). I've tried creating a date table, but it was getting complicated. Was hoping for a more simpler solution. Any help around this?

 

 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

Funny enough, I just recently created just such a quick measure and put it in the gallery:

 

https://community.powerbi.com/t5/Quick-Measures-Gallery/First-Last-Working-Days/m-p/391545

 


@ 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

4 REPLIES 4
Greg_Deckler
Super User
Super User

Funny enough, I just recently created just such a quick measure and put it in the gallery:

 

https://community.powerbi.com/t5/Quick-Measures-Gallery/First-Last-Working-Days/m-p/391545

 


@ 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...

Hi Greg, I tried to download the PBIX file but it's saving as compressed Zip format (changing the extension is not working)

@RustyNails- Strange, I just downloaded the PBIX and opened it no problem, and it came down as a PBIX. Send my your email in private message and I'll mail it to you.


@ 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...

Ah was able to sort this out. Thanks!

 

I was also able to get last day of quarter (instead of working day). But I can't seem to compare the product_ship_date to it (says I cant compare the date to a true/false expression)

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.