Data filtering based on date

I have dataset which includes data for more than three months

I have used a date range filter on my dashboard

Is there a way user is able to see only data of 3 months before only, even though my data set has more

Basically if he changes date filter to less than three months from now- he should see no data

Hi @Mahika_Garg ,

So you can add a filter to your visual or sheet that looks like this:

This will filter the visual so that it will only show the last 3 months. Now to add a filtering control to your visual, you can add something like this:

Adding the second filter to the visual and attaching a control to it, makes it so the user cannot filter the visual past the 3 month mark that you established in the first visual. However, the user will still be able to use the control and filter the visual to any time within the 3 months (i.e. only see the last 2 months rather than 3). I tested it out and I do not think you will be able to make it so the visual does not populate if the user selects a time range that is less than 3 months.

My recommendation would be to create a ‘last N’ filter, like the one I created in the first screenshot, and do not give your user access to change the filter.

Thanks Jacob, it’s working.

But, for eg. if today is 22nd December, it is only showing me data from 1st October

Ideally, it should show data from 22nd September till now

What can I do for that?

Hi @Mahika_Garg

For very specific filtering you should use calculated fields and use the same in the filters.

An example is provided below

  1. I wanted my report for the last 5 weeks; so I created calculated fields to get the date range I needed and created another Date In Range calculated field that produces a boolean value so I can use it as a filter

  1. On the visual I used the Date in range calculated field as a filter where the value equals 1

You need to adopt a similar approach to achieve your desired result

Regards,

Giri

1 Like

Thank you!!

It is working

Hi @Mahika_Garg,

Just checking back in. I wanted to see if the guidance shared earlier helped resolve your question, or if you found a solution in the meantime.

If you still have any additional questions related to your initial post, feel free to share them. Otherwise, any update you’re able to provide within the next 3 business days would be helpful for the community.

Thank you

Yes, As I said creating a calculated field helped for filtering my data for 3 months

1 Like