Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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] )
User | Count |
---|---|
128 | |
108 | |
100 | |
65 | |
62 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |