Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
Check it out now!Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hello, I have a list of dates I would like to use as slicer selections.
I am using 2 tables- Date and Product Archive. The Product Archive table has 2 date columns- a Start Date and an Archive Date. The Date table has a DtKey column. I want to add a column to the Date table that would have the associated Start Date. So for example, in the Date table, all dates that fall between 02/21/2019 and 09/08/2021 should have "02/21/2019" listed in the new column, all dates between 09/09/2019 and 11/03/2019 should have "09/09/2019" listed in the new column.
I can do this manually with the code below, but I want this to be dynamic so that when a new Start Date gets added to the Product Archive, Power BI will also update accordingly.
Solved! Go to Solution.
Hi @bernate ,
Really happy to help you solve this. Here's my solution below.
1.Go through a few steps to get the next date.(reference:Value from previous row )
2.In Date Table, reference the start date field and the next start date field from Product Archive table.
3.Expand it.
4.Create below custom for filtering. Filter out 1.
And here's your final column you want.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you for your help Stephen!
Hi @bernate ,
Really happy to help you solve this. Here's my solution below.
1.Go through a few steps to get the next date.(reference:Value from previous row )
2.In Date Table, reference the start date field and the next start date field from Product Archive table.
3.Expand it.
4.Create below custom for filtering. Filter out 1.
And here's your final column you want.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.