cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jpessoa08
Regular Visitor

[Recursive Measure] Working Days

Hello there,
 
We are trying to create a table that recursively associates a certain day to a certain worker.
 
For example :
 
1/Jan/2019 : holiday, not considered
2/Jan/2019 : (1)John is working
3/Jan/2019 : (2)Claire is working
4/Jan/2019 : weekend, not considered
5/Jan/2019 : weekend, not considered
6/Jan/2019 : (3)Rob is working
7/Jan/2019 : (4)Mike is working
8/Jan/2019 : (1)John is working
 
It would have been an easy sort of index, restarting every 4 days. But the problem are the holidays.
 
John and Claire are on holidays on the 8/Jan/2019, so we should obtain something like this :
 
1/Jan/2019 : holiday, not considered
2/Jan/2019 : (1)John is working
3/Jan/2019 : (2)Claire is working
4/Jan/2019 : weekend, not considered
5/Jan/2019 : weekend, not considered
6/Jan/2019 : (3)Rob is working
7/Jan/2019 : (4)Mike is working
8/Jan/2019 : (3)Rob is working
 
Using a few MINIFs in Excel 365 (link with the example: https://www.dropbox.com/s/0ezzmda7qqixsoq/Working%20Days.xlsx?dl=0 ) I managed to obtain it and use it since the begging of the year, but never managed to recreate it in PowerBi (Dax or M)....
 
Any ideas out there?
 
Thanks in advance
1 REPLY 1
Super User IV
Super User IV

Re: [Recursive Measure] Working Days

DAX won't let you do recursion. You will need to use M. https://community.powerbi.com/t5/Community-Blog/Fun-with-Graphing-in-Power-BI-Part-3i/ba-p/365784

 


---------------------------------------

Not the Power BI thought police...

I have NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors