Forum Discussion
Power BI - Custom Date Range Filter Support
Hey,
Thanks for the response! A Couple of follow up questions:
In Step 2 - "WEEK" isn't an option in DATESINPERIOD?
In Step 3 - What am I actually creating here?
I appreciate the response but I feel it's missing a couple of steps, and dare I say it's a bit like Chat GPT wrote it 😬
Hi ShaneHi
You are right, I made a mistake here. Thank you for pointing it out. DATESINPERIOD only supports days, months, quarters, and years. Here is the changed DAX:
"Last 10 Weeks", DATESINPERIOD('Calendar'[W/C Monday], MAX('Calendar'[W/C Monday]), -10*7,Day)
Since I don't know your specific data structure and don't have any sample data, I can only provide you with a potentially effective method.
If you can provide sample data that does not contain any private information, it will greatly help in solving your problem.
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- ShaneHi1 year agoFrequent Visitor
Thanks for the response. I appreciate this is difficult without a desktop file to sample.
1) I created a table with this code
2) I created a measure with this code
3) I don't know how to create a measure with this code. What is "Your Measure Here" referring to?
I just keep hitting a wall with this code. My plan is to have a matrix table show the last 7 days of data (7 columns of previous days), 10 weeks of data (10 columns of the previous weeks) or 12 months of data (12 columns of previous months) depending what get's selected
- ShaneHi1 year agoFrequent Visitor
Hi,
I'm still stuck with this and wondering if you can help some more.
As I asked in my last response, in step 2 - was I right to create a DAX Measure with this code?
And in Step 3 - I'm assuming "YOUR MEASURE" refers to what i'm trying to output? The problem is - i'm hoping to have the slicer as a Date Column in a Matrix which contains multiple measures