Forum Discussion
Previous Weeks Data with date slicer
Hi - I am creating a line chart that is supposed to show - screen shot of what my report looks like is below along with a table showing there should be at least 1 point green and orange.
- data from the previous week
- data from week before the previous week
- data year to date.
The code i am using is:
Hi Foodd - the powerbi file is attached to the SharePoint data, which is sensitive, i am not able to post the data online.
3 Replies
- foodd
Community Champion
Please provide your work-in-progress Power BI Desktop file (with sensitive information removed) that covers your issue or question completely in a usable format (not as a screenshot).
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/1447...
This allows members of the Forum to assess the state of the model, report layer, relationships, and any DAX applied.- SCNCKS1
Helper I
Hi Foodd - the powerbi file is attached to the SharePoint data, which is sensitive, i am not able to post the data online.
- parry2k
Super User
SCNCKS1 try this for prev week
Value Prev Week = VAR __selectedWeekRank = SELECTEDVALUE ( 'Date'[Week Rank] ) VAR __prevWeekRank = __selectedWeekRank - 1 RETURN CALCULATE( [Value/DAY], 'Date'[Week Rank] - __prevWeekRanke )👉 Learn Power BI and Fabric - subscribe to our YT channel - @PowerBIHowTo