Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi everyone,
I am struggling with some DAX and would really appreciate some assistance. This is the trickiest issue I have ever had to solve!
I have a table as above with a bunch of order date and order stage changes for an order. For each order date change entry is the number of days that the order was changed by each time. For each stage (A,B,C,D,E,F) I need to calculate the number of days and times that the order was changed during that stage. For example, the stage was changed to D, then the order date changed twice, totaling 21 days during that stage. Then the stage was changed to stage E, where it changed 15 times totaling 239 days.
Can split these entries into more columns if need be.
Thank you in advance to anyone who can solve this problem!
you can count days between 2 different dates with
DATEDIFF(Date1;Date2;Interval)
like:
DATEDIFF('Table1'[ColumsWithFirstDate];'Table1'[ColumsWithSecondDate];DAY)
or
DATEDIFF('Table1'[ColumsWithFirstDate];TODAY();DAY)
I assume you have a unique order number to which you assign your stages, dates and changes?
To record the number of canges I would suggest a variable that increases with each change as it is described here: https://community.powerbi.com/t5/Desktop/Increment-variable-after-condition/td-p/663156
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
8 | |
6 | |
4 | |
3 |