Show dates within specific range

Hi all,

I am working on a report where I need to do the following.

  1. Enable the user to specific a number of days to compare through a slicer ranging from 1-9 days (1-9 for the sake of the demo file).
  2. Enable the user to select a period start date
  3. Enable the user to select a comparison period start date
  4. Plot both of the date ranges on the same graph… for example:

Period start date = 11/01/2024
Compare period start date = 25/06/2024
Number of days = 4

This will then mean for my period start date:
11/01/2024 = Day 1
12/01/2024 = Day 2
13/04/2024 = Day 3
14/01/2024 = Day 4

And for my comparison start date
25/06/2024 = Day 1
26/06/2024 = Day 2
27/06/2024 = Day 3
28/06/2024 = Day 4

I have managed to get this working and can plot both of these on the same graph

My issue… (and I think I’m missing something really obvious), is that I cannot get the graph to only show me dates UP TO the selected date range, e.g. the graph should only show me 4 days rather than 9.

I have created a secondary ‘Total Days 2’ table to replace my ‘Total Days’ axis, so I can filter this table based on the slicer selection in my Total Days column, so if the day is below or equal to the selected day TRUE, else FALSE.
Then my idea was to simply filter the visual to say only show me the days where TRUE.

I’m not sure where I’m going wrong with this and find I’m going around in circles.

Any help would be hugely appreciated! i have attached the demo file which explains everything in more detail

Thank you
Sales range comparison.pbix (3.6 MB)

1 Like

Hi @Clolawra ,

While waiting for the community to review and respond to your issue, take advantage of Data Mentor . It offers a wealth of tools and resources that could provide immediate solutions and enhance your report-building efficiency.

Suggested link: https://mentor.enterprisedna.co/explain-simply

Cheers,

Enterprise DNA Support Team

Hi @Clolawra - Do check solution in attached PBIX and let me know if it works.

Sales range comparison_Ankit.pbix (3.6 MB)

Thanks
Ankit J

Thank you so much Ankit! That has worked perfectly, massively appreciate your help!

Chloe