Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all,
My client has requested me to have a specific date range within a chart.
Can anyone show me how to create a date range as follows:
Min Date: Current Month - 2
Max Date Current Month +6
This should cover 9 months of data.
Thank you.
Solved! Go to Solution.
Hi @Anonymous
You can downlad this calendar table and apply the filter as below.
Regards,
Mariusz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
You shoud be able to use Relative date filtering.
https://docs.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range
Regards,
Mariusz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Mariusz
I do know how relative date filtering works, but I have not been able to set it for the specified range:
Min Date: Current Month - 2
Max Date Current Month +6
This should cover 9 months of data.
Do you know how to do it ?
Thanks!
Hi @Anonymous
You can downlad this calendar table and apply the filter as below.
Regards,
Mariusz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Mariusz Thanks for helping me with this, I am however solutioning this in a established data mdel.
Can you please let me know how did you build the sYear field?
Hi @Anonymous
Please download the file and see the Query Steps it should be fairly easy to understad.
If you are struggling then please let me know.
Regards,
Mariusz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I am almost there,
Date.Year([Date]) - nowYear is the custom column sYear
However how do I get the variable nowYear?
Thanks
Hi @Anonymous
This will be
nowYear = Date.Year(nowDate)
nowDate = Date.From(nowDateTime)
nowDateTime = DateTime.LocalNow()
Hope this helps.
Mariusz
Hi @Anonymous
Now this are queries in variebles folder
Thanks
Mariusz
Ok @Mariusz thank you so much! I will mark your solution as accepted.
I have one other thing I need your help. I will open a new ticket.
Thanks.
There is one issue, I do not have the advanced filter options as you do.
I do not have "Less than or equal to" for example.
Hi @Anonymous
Make sure you chage the data type in query editor to Whole Number.
Regards,
Mariusz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |