Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I am a beginner with Power BI and DAX from Sweden that really need your help. I have watched a lot of youtube about DAX and experimented a lot but now im stuck..
I have searched for an awnser but cant find a simular issue so now im turning to the experts 🙂
So I have a table with all orders that I have in the system. When the order is created it gets a date. When the customers give a call and tells us the order is ready for templating the order status is changed to "Template booked" and gets a new date. This could be 1 week up to like 50 weeks before it happens.
So i need to know how many weeks/days it is for a order to go from "Created" to "Template booked".
Column DOCINDEX is the value that is the same on the order.
Thank you in advance!
Solved! Go to Solution.
Hi @Renstrom
please try
Process Days =
VAR CurrentEndDate = 'Table'[Slutdatum]
VAR CurrentIndexTable =
CALCULATETABLE ( 'Table', ALLEXCEPT ( 'Table', 'Table'[DOCINDEX] ) )
VAR StartDate =
MAXX ( CurrentIndexTable, 'Table'[Startdatum] )
VAR EndDate =
COALESCE ( MAXX ( CurrentIndexTable, 'Table'[Slutdatum] ), StartDate )
RETURN
IF ( CurrentEndDate <> BLANK (), DATEDIFF ( StartDate, EndDate, DAY ) )
Hi @Renstrom
please try
Process Days =
VAR CurrentEndDate = 'Table'[Slutdatum]
VAR CurrentIndexTable =
CALCULATETABLE ( 'Table', ALLEXCEPT ( 'Table', 'Table'[DOCINDEX] ) )
VAR StartDate =
MAXX ( CurrentIndexTable, 'Table'[Startdatum] )
VAR EndDate =
COALESCE ( MAXX ( CurrentIndexTable, 'Table'[Slutdatum] ), StartDate )
RETURN
IF ( CurrentEndDate <> BLANK (), DATEDIFF ( StartDate, EndDate, DAY ) )
Wow, many thanks, you are awesome!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
23 | |
10 | |
10 | |
9 | |
7 |