Forum Discussion
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
- lbendlin
Super User
Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523