Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
8 | |
8 | |
8 | |
6 |
User | Count |
---|---|
14 | |
12 | |
11 | |
10 | |
9 |