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.
So our group has been tasked to create a MTD and Last Year MTD column base on a set of data we have been given.
For some reason these data doesn't come with dates but has a designated "Period" column that acts as the dates, so we can't use any time inteligence
Period | Value | |
201801 | 7890 | |
201802 | 2468 | |
201901 | 2276 | |
201902 | 2688 | |
201801 | 3421 | |
201802 | 2342 | |
201901 | 3342 |
For MTD we used this code
MTD sales = CALCULATE(SUM(Table[Value]),
FILTER(Table, MAX(Table[Period])))
but for Last Year MTD we have been stumped, I tried something like
Last Year MTD sales = CALCULATE(SUM(Table[Value]),
FILTER(Table, (Table[Period]-100)))
but it doesn't seem to work, can someone help?
Solved! Go to Solution.
Hi @Retrorock
Use this measure
Last Year MTD =
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER ( ALL ( 'Table' ), 'Table'[Period] = MAX ( 'Table'[Period] ) - 100 )
)
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi @Retrorock
Use this measure
Last Year MTD =
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER ( ALL ( 'Table' ), 'Table'[Period] = MAX ( 'Table'[Period] ) - 100 )
)
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
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 |
---|---|
114 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |