Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
dosania
Helper II
Helper II

How to create a new date column from 2 dates with dynamic filtering

Hi,

 

I'm trying to allow users to filter by a single date field to choose their selection.
The challenge I have is that I have 2 fields that I would like them to choose from, and would like one selection to force the other.

 

I have;

a. Policy Start date - Users to select on or before e.g. 01/07/2022
b. Expiry date (After) - This should be the same as the Policy start date

 

I would like one date field that they can choose from which allows them to filter on both using the logic above.

Below are some screen shots of my date filters as an example;

 

dosania_0-1660899291167.png

 

Also, the date selection I am giving to users for selecting their date for Policy Start date shows a before and after date.
Is it possible to just have the one date value that they can select from?


I'd appreciate it if anyone can let me know if they have managed to achieve this before, and if possible?

Many thanks

5 REPLIES 5
MagicGianky
Frequent Visitor

what logic should the second date have? if I choose the first date, with what logic should I have the second date automatically? +/- nn days?

PijushRoy
Super User
Super User

Hi @dosania 

Can you please try slicer sync option and hide 2nd clicer from the selection pane
https://docs.microsoft.com/en-us/power-bi/developer/visuals/enable-sync-slicers

If solve your requirement, please mark this answer as SOLUTION
If this comment helps you, please LIKE this comment/Kudos




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





Thanks @PijushRoy. I've tried using your suggestion to sync slicers, but those isn't working.

I'm trying to force the value of one slicer, by selecting the date of another.

Below is a screenshot of what I tried to do using your suggestion, but they're syncing.

 

dosania_0-1660902977294.png

 

 

@dosania 

Start date and expire data from same or different table
Date in slicer coming from Data table or from calender table
Can you please share your data model image


My previous comment will not work for your scenario.
May be you need to create sperate lookup table and create both way relationship but it depend on your data model


 




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





@PijushRoy

Start date and expire data are from the same table
The date in the slicer is coming from this same data table.

 

We don't have a calender table in our model, just using the source data.

The policy table that I am using that has this date information only joins to a transactional table.

I'm afraid I'm not able to share an image of the model

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.