April 16, 2019 at 5:53 pm
When Attempting to calculate a rolling total with the following DAX Formula
Delta12M2:= CALCULATE(
[Delta21],
DATESBETWEEN(
COP[Fakestartdate],
SAMEPERIODLASTYEAR(NEXTDAY(LASTDATE(COP[Fakestartdate]))),
LASTDATE(COP[Fakestartdate])
)
)
When I filter the data set for 2 years (2017 & 2018 ) in Power BI, it is calculating correctly for Q4 2018 , but for Q3, Q2 & Q1 all it does is use the periods from 2018. I thought maybe it was an issue with filtering the visual to only show 1 year of data at a time (2018), but that does not appear to be the case.
I am able to get the correct numbers using the Quick Measures in power BI, But when I look at the DAX, it appears to be using a hiererchy based on COP[Fakestartdate] such as COP[Fakestartdate].[Year], Which does not exist in the tabular model and I am not really sure how to add them in the same way in the tabular model
April 18, 2019 at 1:48 pm
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply