Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Date table relationship messes up data

Hey All,

 

I've never run into this issue before and have been researching for the past week or so and couldnt find anything. The issue I am having is I have a regular imported table with various metrics and [date published] is considered the date metric of this table. I was able to calculate current month using that but with the previous month it seems a data table is needed with the formula. I create the date table using this 

Date = Calendar(Date(2022,1,1),Date(2026,12,31))

 

I then create a relationship between [date published] and the date table but whenever I create it the data completely changes but the previous month is populating (although with wrong data). Anyone else run into this? Previous month formula is below:

 

Prev = Var Previous= CALCULATE(sum(Articles[UVM (Insights by Similarweb)]),PREVIOUSMONTH('Date'[Date]))

Return if( ISBLANK(Previous),0,Previous)

1 Reply