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.
Hi
I am bing really silly here, but i want to create a DAX measure to calcualte demand for 'next year' and 'next year +1' etc without using the field 'year' in the table visual.
The suporting table is structured like the below
Material | Sales Date | Total |
A | 01/01/2023 | 10 |
A | 01/01/2024 | 10 |
A | 01/01/2025 | 10 |
A | 05/01/2023 | 10 |
the output i desire is like the below (and i want to create this without hardcoding the year in the measure)
Material | Next Year Sales (2024) | Next Year +1 Sales (2025) |
A | ||
B |
So i currently use something like this:
Calcaulate(Sum(Material[total]),Calendar_Table[year] = "2024"))
but i want to avoid this for future proofing the report
Cheers
Solved! Go to Solution.
@Jtbonner1986 , Use this dax measure formula:
Next Year Sales (2024) = Calcaulate(Sum(Material[total]),Calendar_Table[year] = Year(Today()) + 1))
and +2 for next year +1
Thank You
In Calendar / Date table create calculated column NextTwoYears, with True False values.
In your measure, CALCULATE part should look like below (adjust your Calendar / Date table name)
Calculate(Sum(Material[total]), <YourTable>[NextTwoYears]="True"
Did I answer your question? Kudos appreciated / accept solution!
Proud to be a Super User!
@Jtbonner1986 , Use this dax measure formula:
Next Year Sales (2024) = Calcaulate(Sum(Material[total]),Calendar_Table[year] = Year(Today()) + 1))
and +2 for next year +1
Thank You
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 | |
102 | |
86 | |
77 | |
68 |
User | Count |
---|---|
120 | |
108 | |
98 | |
83 | |
77 |