Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi -
I am attempting to get a dynamic 13-month trend that will update based on the date I select in a drop-down.
For example, when I select February 2025, I want the trend to show February 2024-February 2025 or when I select January 2025, I want to see January 2024 - January 2025, etc.
I can't use a date range filter due to other visuals on the page that are only for the specific reporting month. Also I don't want to allow free range filter, only 13 months back from the month selected.
Based on some googling / copilot help I completed the following steps, but the range is still not coming through correctly. Any help greatly appreciated!
Step 1: Create SelectedMonth Measure on 'Calendar' Table
Step 2: Create SelectMonthColumn
Solved! Go to Solution.
Hi,
I have solved a similar question in the attached PBI file.
I also noticed that the date range is different depending on whether I display as just the date or the date hierarchy. Does anyone know why this may be?
Hi @abd8,
I wanted to check if you had the opportunity to review the information provided by @Ashish_Mathur. Please feel free to contact us if you have any further questions. If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
The calculated table you created in step 5 is unable to recognize user-specified filters in Report view (e.g., slicers). See link below for a dynamic solution:
https://www.sqlbi.com/articles/show-previous-6-months-of-data-from-single-slicer-selection/
Proud to be a Super User!
This is very helpful. However, when I try to implement that code, I'm getting this error:
USERELATIONSHIP function can only use the two columns references participating in relationship.
I did tweak it slightly for my use case, so that may be what's causing it:
Verify the columns in the relationship between 'Previous Date' and 'Calendar'. The columns in the relationship should be used in the USERELATIONSHIP function.
Proud to be a Super User!
Ok, I set up the relationship and that formala is now working. How do I now set up my slicer and x-axis to ensure a proper 13-month lookback on the x-axis based on the slicer selection?
The slicer would be based on a 'Calendar' field such as Year Month (you should be able to control all visuals with this slicer). The x-axis would use a 'Previous Date' field.
Proud to be a Super User!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
76 | |
56 | |
38 | |
34 |
User | Count |
---|---|
99 | |
56 | |
51 | |
44 | |
40 |