Forum Discussion
Parallel Period producing the same result as current period
Hi there,
I have created the below expression to populate a line graph. This works perfectly for the current period.
However, when I try to work out the values for the previous period, using parallel period, it does not seem to work.
I turned this into a table to see more clearly.
Any help would be greatly appreciated.
Thank you.
Melanie
5 Replies
- amitchandak
Super User
melg , You should use Date table for that
Gross Posted Deals 1YR =
CALCULATE([Gross Deals Posted],
SAMEPERIODLASTYEAR('Date'[Date],
-12,
MONTH)
)or
Gross Posted Deals 1YR =
CALCULATE([Gross Deals Posted],
SAMEPERIODLASTYEAR('Date'[Date])
)or
Gross Posted Deals 1YR =
CALCULATE([Gross Deals Posted],
dateadd('Date'[Date],
-12,
MONTH)
)Why Time Intelligence Fails - Power bi 5 Savior Steps for TI: https://youtu.be/OBf0rjpp5Hw
- melgFrequent Visitor
Hi there, thank you for your response!
I tried both the SAMEPERIODLAST YEAR and DATEADD and it produces the same result, however this time there is only a value populating for October....
I am using ReportingDate from my date table called pavw_Dates.
Thanks.
- amitchandak
Super User
melg , Use date table, that is marked as date table, to make time intelligence work.
I also see a role of an independent table here. As you are displaying 12 month , when one month is selected
refer
Why Time Intelligence Fails - Power bi 5 Savior Steps for TI: https://youtu.be/OBf0rjpp5Hw
Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI
- mahoneypat
Microsoft Employee
Please share your [Posted Deals 13Months] measure. I suspect that is undoing what you are trying to do with the time intelligence functions.
Pat
- melgFrequent Visitor
Hi there,
Posted Deals 13Months =VARLDate = MAX(pavw_Dates[ReportingDate])VARFDate = EOMONTH(LDate,-13)VARResult =IF(MAX(FilterDates[ReportingDate]) <=LDate &&MIN(FilterDates[ReportingDate]) >=FDate,CALCULATE([Posted Deals],FILTER(ALL(pavw_Dates[MonYear]),pavw_Dates[MonYear] =VALUES(FilterDates[MonYear]))))RETURNResultThe reason I did this was to be able to show 13 months on the graph, no matter what month was selected in the slicer. This date slicer is using the pavw_Dates table.Also as part of this process, I created another date table called FilterDates:FilterDates = pavw_DatesThis was so the graph would work correctly showing the 13 months, so in my Axis, I have the MonthYear from the FilterDates table.I hope that makes sense.Thanks.