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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
joshua1990
Post Prodigy
Post Prodigy

Filter out articles based on individual date

Hi experts!

I have a table that contains all our product in this format:

ProductValueSizeDate
A  01.01.2023
A1  10.06.2024
A2  01.05.2024

 

In the last column you will find the data until the product was active. After that date the product was deactivated.

I have multiple reports / pages based on this product table. These reports show different data.

Now I would like to have some kind of filter on all pages to filter the products out based on the selected date.

For instance: I have a bar chart that shows me the sales YTD aggregeated per month. Now, if I look into the bar chart in June this year, then I don't want to see any entry for product A since this is already deactivated.

How is this possible?

1 ACCEPTED SOLUTION
v-huijiey-msft
Community Support
Community Support

Hi @joshua1990 ,

 

Thanks for the reply from lucadelicio .

 

I just have a question - is "01.05.2024" in dd-mm-yyy format or mm-dd-yyyy format? But in any case, in your description, it should be expired after this date, so why can you see A2 when you select June?

 

Please try:

 

Create a disconnected date table and month column:

Date = CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))

Month = MONTH('Date'[Date])

 

Put the month column in the slicer.

 

Create a measure:

Measure =
VAR _selDate = SELECTEDVALUE('Date'[Month])
RETURN IF(MONTH(MAX('Table'[Date])) >= _selDate,MAX('Table'[Date]),BLANK())

 

Replace the measure with the Date column of the original table and put it in the table visual object.

 

The final page visual effect is as follows:

vhuijieymsft_0-1718090214030.png

 

If you have any other questions please feel free to contact me.

 

The pbix file is attached.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

View solution in original post

2 REPLIES 2
v-huijiey-msft
Community Support
Community Support

Hi @joshua1990 ,

 

Thanks for the reply from lucadelicio .

 

I just have a question - is "01.05.2024" in dd-mm-yyy format or mm-dd-yyyy format? But in any case, in your description, it should be expired after this date, so why can you see A2 when you select June?

 

Please try:

 

Create a disconnected date table and month column:

Date = CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))

Month = MONTH('Date'[Date])

 

Put the month column in the slicer.

 

Create a measure:

Measure =
VAR _selDate = SELECTEDVALUE('Date'[Month])
RETURN IF(MONTH(MAX('Table'[Date])) >= _selDate,MAX('Table'[Date]),BLANK())

 

Replace the measure with the Date column of the original table and put it in the table visual object.

 

The final page visual effect is as follows:

vhuijieymsft_0-1718090214030.png

 

If you have any other questions please feel free to contact me.

 

The pbix file is attached.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

lucadelicio
Super User
Super User

Hi @joshua1990 ,

You have to consider that the status of the product change in the time.

So if a product is inactive now, this not means that it could be yesterday.

 

For instance to verify if a product is active TODAY, you can create a calculated column.

 

ActiveToday =
IF([Date] >= TODAY, 1, 0)

Then you can use this filter in all yours pages.
But as i explain before this not work in the past.
I think for the report that shows the historical data you have to select a specific date of validity to do the comparison.



Luca D'Elicio

LinkedIn Profile

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.