Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
95 | |
80 | |
67 | |
62 |
User | Count |
---|---|
138 | |
107 | |
104 | |
82 | |
63 |