Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello
I have a table with 4 important columns :
The movement 1 corresponds to a orderquantity and the movement 2 corresponds to a cancellation of 1 of the movement 1 thanks to the ID of purchase. So for example on the screenshot we can see a deliver an order quantity the 14 of February of 15.360 and the 19 a cancelation of the same quantity. You can see the ID of purchase is the same. So, how can I calculate to have 0 for this ID for example.
Solved! Go to Solution.
Hi @NilsPR ,
I create a new table as you mentioned.
Then I create a calculated column and here is the DAX code.
Column =
SUMX (
FILTER (
'Table',
'Table'[ID of purchase for each line]
= EARLIER ( 'Table'[ID of purchase for each line] )
),
'Table'[Quantity]
)
Finally you will get the result you want.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @NilsPR ,
I create a new table as you mentioned.
Then I create a calculated column and here is the DAX code.
Column =
SUMX (
FILTER (
'Table',
'Table'[ID of purchase for each line]
= EARLIER ( 'Table'[ID of purchase for each line] )
),
'Table'[Quantity]
)
Finally you will get the result you want.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
106 | |
86 | |
81 | |
74 | |
71 |
User | Count |
---|---|
112 | |
101 | |
96 | |
74 | |
67 |