This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowThe Fabric community is upgrading! Read all of the details including the timeline and what you can expect. Learn more
column = calculate(SUM('Calendar for 5 day'[WorkDay]),filter('Calendar for 5 day',and('Calendar for 5 day'[Date]>orders[Order Date], 'Calendar for 5 day'[Date]<=Orders[shipped date])))
I am having an issue with adding a column calculating day difference for work days. My table contains orders with multiple lines for the various contents of my orders. For example, my order 123 can contain 1-10 lines and therefore order 123 appears 10 times. I have a column for the line number. The calculated column above works for the 1st line but not the rest of the lines.
Please help. Do i need to use SUMX instead or DISTINCT infront of order date and shipped date?
Solved! Go to Solution.
Have you solved your issue by now? If you have, could you please help mark the correct answer to finish the thread? Your contribution will be much appreciated.
Regards,
Jimmy Tao
Have you solved your issue by now? If you have, could you please help mark the correct answer to finish the thread? Your contribution will be much appreciated.
Regards,
Jimmy Tao
Suppose the two tables have relationship with each other, you may try measure below:
column =
CALCULATE (
SUM ( 'Calendar for 5 day'[WorkDay] ),
FILTER (
'Calendar for 5 day',
AND (
'Calendar for 5 day'[Date] > RELATED ( orders[Order Date] ),
'Calendar for 5 day'[Date] <= RELATED ( Orders[shipped date] )
)
)
)
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
| User | Count |
|---|---|
| 24 | |
| 22 | |
| 20 | |
| 18 | |
| 14 |
| User | Count |
|---|---|
| 27 | |
| 21 | |
| 20 | |
| 20 | |
| 20 |