To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi All,
I'm new to Power Bi Dax and needed some guidance on how we can accomplish the following:
A | B | C | D | E |
Project | Phased | Date1 | Date2 | network Days |
1 | Yes | 9/23/2019 | 12/31/2019 | 8 |
2 | No | 12/16/2019 | 6/20/2020 | 245 |
3 | No | 9/12/2019 | 1/12/2020 | 131 |
=IF(B:B="Yes",NETWORKDAYS(TODAY(),C2),NETWORKDAYS(TODAY(),D2+60))
If phased is "Yes" then choose Date1 as the end date to calculate network days else add the #of days to date2 (I want to able to choose either 60, 90 or 120 days from a slicer. I have manually added 60 in the above example)and calculate the network days between today and the new end date.
Any help will be much appreciated.
Solved! Go to Solution.
@Anonymous you can add flag for weekend in your table and then use that in your measure to filter it out
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@Anonymous
add following measure
Network Days = VAR __phase = MAX( Table[Phased] ) VAR __date = IF( MAX( Table[Phased] ) = "Yes", MAX( Table[Date] ), MAX( Table[Date2] ) + SELECTEDVALUE( SlicerTable[SlicerValue] ) ) RETURN DATEDIFF( TODAY(), __date, DAY )
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@Anonymous you can add flag for weekend in your table and then use that in your measure to filter it out
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
I have the flag added to my date table but struggling to add the filter to the measure. Any further help will be much appreciated.