Forum Discussion
Time Intelligence
- 4 years ago
Hi KendallBrown13 ,
There're two possible reasons why the previous year value disappear, first maybe it return blank, which because of there's no value in the previous year in the sample or a incorrect formula, second maybe the previous year value and the current year value coincide. You can convert the chart to a table visual to see the specific value.
Additionally, the MonthYear column in your sample is already a date format and does not need to add .[Date] after it in the formula.
I create a sample and here's my solution.
Pre = CALCULATE ( SUM ( 'Table'[Sales] ), FILTER ( ALL ( 'Table' ), 'Table'[MonthYear] = DATE ( YEAR ( SELECTEDVALUE ( 'Table'[MonthYear] ) ) - 1, MONTH ( MAX ( 'Table'[MonthYear] ) ), DAY ( MAX ( 'Table'[MonthYear] ) ) ) ) )It get correct result in my sample.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
KendallBrown13 , Join your month year date column with the date table and then create the measure. Make sure slicer and visual also use the period from date table
Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5bd4
I don't have a date table in my model. Is there a recommended way I should set this up?