I am trying to get my measures to return the volume of sales for the highest selected year and lowest selected year. I got some measures working but not how I intended. Basically the MAX measure will return the higher value. So if 2021 had higher sales total than 2022 it will return the 2021 sales value. Similarly MIN returns the lower volume not the lower year. Any help is greatly appreciated!!!
EX: If 2023 and 2021 are selected I want the MAXX to return $7,223,556.01 and MINX to return $35,559,982.53
2019 | 2020 | 2021 | 2022 | 2023 |
8,337,760.31 | 9,448,871.42 | 35,559,982.53 | 24,448,871.42 | 7,223,556.01 |
Solved! Go to Solution.
Hi,
Create a Calendar Table with a calculated column formula for Year. To your slicer, drag Year from the Calendar Table. Create a relationship (Many to One and Single) from the Invoice Created Date column to the Date column of the Calendar Table. Write these measures
Max selected year = max(calendar[year])
Amount at max selected year = calculate([Invoiced RT ACT Material Cost],filter(values(Calendar[year]),Calendar[year]=[Max selected year]))
Hope this helps.
Hi,
Create a Calendar Table with a calculated column formula for Year. To your slicer, drag Year from the Calendar Table. Create a relationship (Many to One and Single) from the Invoice Created Date column to the Date column of the Calendar Table. Write these measures
Max selected year = max(calendar[year])
Amount at max selected year = calculate([Invoiced RT ACT Material Cost],filter(values(Calendar[year]),Calendar[year]=[Max selected year]))
Hope this helps.
Thank you! This is exactly what I needed.
You are welcome.