Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
Check it out now!Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
I have a line graph that shows % on the Y axis and dates on the X.
The graph has a static filter on it that is set to only show dates where the week offset is greater than or equal to -52 (i.e. showing a year of data).
I want to show have a line on the X-Axis that shows where the week offset is equal to -4 (i.e. 4 weeks ago).
I created the following Measure
Week End Date 4 Weeks Ago =
VAR OneWeekEndSelected = HASONEVALUE(Dates[WeekEnding])
VAR SelectedWeekOffset = IF(OneWeekEndSelected=TRUE,VALUES(Dates[WeekOffset]),99)
VAR WeekOffSet4WeeksAgo = SelectedWeekOffset-3
VAR Date4WeeksAgo = LOOKUPVALUE(Dates[WeekEnding],Dates[WeekOffset],WeekOffSet4WeeksAgo)
return Date4WeeksAgo
When I look at thie value in a Card it is correct.
When I add this to the X-Axis Constant Line as a Conditional Fomat, it does not show.
If I manually type in the date and do not use the Conditional Fomat optoin the lines shows as I want. However as the data grows week on week then next week the fixed date will be 5 weeks and not 4 weeks ago.
Can anyone advise why the line is not showing when I use a method?
Thanks,
You can try to add a measure that computes the -4, and add it to the chart.
Please provide sanitized sample data that fully covers your issue. I cannot help you without usable sample data.
Please paste the data into a table in your post or use one of the file services like OneDrive or Google Drive. I cannot use screenshots of your source data.
Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523