Hi guys
I have a DAX question that I hope you guys can help me with:
My data looks like this:
<tbody>
</tbody>I would like an end-result that looks like this, that shows the latest week and latest weeks sales amount pr product.
So if i for instance have two different products, product1 and product2 my endresult would look like this:
<tbody>
</tbody>I have the measure for "Latest week":
LatestWeek:= MAX([Week])
However i need the measure for LatestSalesAmount. I was thinking something like this, but that is not allowed:
LatestSalesAmount:= CALCULATE(SUM([SalesAmount]);[Week]=MAX([Week]))
Thanks!
I have a DAX question that I hope you guys can help me with:
My data looks like this:
Product | Week | SalesAmount |
---|---|---|
Product1 | 48 | 20100 |
Product2 | 47 | 15900 |
Product1 | 49 | 10400 |
Product2 | 48 | 14900 |
<tbody>
</tbody>
So if i for instance have two different products, product1 and product2 my endresult would look like this:
Product | LatestWeek | LatestSalesAmount |
---|---|---|
Product1 | 49 | 10400 |
Product2 | 48 | 14900 |
<tbody>
</tbody>
LatestWeek:= MAX([Week])
However i need the measure for LatestSalesAmount. I was thinking something like this, but that is not allowed:
LatestSalesAmount:= CALCULATE(SUM([SalesAmount]);[Week]=MAX([Week]))
Thanks!