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,
Im trying to make a que list by ranking order date and quantity that i will match with available quantity, so if i have 4 available units i will give those to the first 3 orders, since the third order in the example has ordered 2. I have managed to rank the orders by date but cant wrap my head around how to make it consider the quantity in each order.
Expected behaviour of the rank column:
Order id | Order date | product | quantity | rank |
245677 | 2021-11-25 | 45677 | 1 | 1 |
246777 | 2021-11-26 | 45677 | 1 | 2 |
278899 | 2021-11-27 | 45677 | 2 | 4 |
294678 | 2021-11-28 | 45677 | 1 | 5 |
Solved! Go to Solution.
Hi @Trolleri ,
Please have a try.
Create a measure.
Measure = CALCULATE(SUM('Table'[quantity]),FILTER(ALL('Table'),'Table'[Order date]<=MAX('Table'[Order date])))
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Trolleri ,
Please have a try.
Create a measure.
Measure = CALCULATE(SUM('Table'[quantity]),FILTER(ALL('Table'),'Table'[Order date]<=MAX('Table'[Order date])))
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Trolleri , This seem like cumulative Qty
new measure
=sumx(filter( allselected(Table), Table[Date] <= max(Table[Date]) ), [Quantity] )
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 |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |