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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
thibbos
Resolver I
Resolver I

Slicing Calendar Table based on multiple columns condition

Hi everyone,

I have a calendar Table containing my dates and some calculated columns that allows me to easily filter by dates in DAX Measures. See table below (my dates are contiguous of course, it is just a short example) where the TODAY date would be 15/10/2024

DatesLast MonthLast 3 monthsLast 12 months
01/01/2024NONOYES
01/04/2024NONOYES
01/07/2024NOYESYES
01/10/2024YESYESYES


This allows me to basically do measures like SALES LAST 3 MONTHS = CALCULATE(Sales, filter LAST 3 Months = "YES")

Now, I would like the user to be able to use a slicer where he potentially could choose himself how to filter the sales:
So if my table would be:

 01/08/202401/09/202401/10/2024
Product A   
Product B   

 

The slicer would need the user to choose:
Last Month => the behaviour of the table should show only 01/10/2024
Last 3 Months => the behaviour of the table should show only 01/10/2024 - 01/09/24 - 01/08/24
and so on

But when using this in a parameter it OF COURSE does not work because the slicer only contains the column.
Is there a way in the parameter itself to add the filter condition.

Current PARAMETER:

Weekly Date Filter Types = {
    ("L52W", NAMEOF('LC_Calendar_Weekly'[L52W]), 0),
    ("L26W", NAMEOF('LC_Calendar_Weekly'[L26W]), 1),
    ("L16W", NAMEOF('LC_Calendar_Weekly'[L16W]), 2),
    ("L4W", NAMEOF('LC_Calendar_Weekly'[L4W]), 3),
    ("LW", NAMEOF('LC_Calendar_Weekly'[LW]), 4)
}
 
=> iso NAMEOF, would it be possible to use FILTER(('LC_Calendar_Weekly'[L26W])="YES")
 
I probably if i can create this, would need to link the parameter table to the calendar table itself. That is not an issue.

I hope someone can help, 

Thanks a lot



1 ACCEPTED SOLUTION
thibbos
Resolver I
Resolver I

For now I solved it by adding multiple slicers to my page where the user can choose one he wants and SELECT it

View solution in original post

4 REPLIES 4
thibbos
Resolver I
Resolver I

For now I solved it by adding multiple slicers to my page where the user can choose one he wants and SELECT it

_AAndrade
Super User
Super User

Take a look at this blog: https://radacad.com/power-bi-from-and-to-date-filtering-with-one-slicer
See if this could solve your problem.





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




_AAndrade
Super User
Super User

Hi,

If I understood well, you can use parameter with all your measures for each period.
For example:
Measure_Parameter =

{
    ("Last Month"NAMEOF('Measure'[SALES LAST MONTH]), 0),
    ("Last 3 Month", NAMEOF('Measure'[SALES LAST 3 MONTH])), 1),
    ("Last 6 Month", NAMEOF('Measure'[SALES LAST 6 MONTH])2),
    ("Last Year", NAMEOF('Measure'[SALES LAST YEAR])3)
}

And after use a Matrix visual as you have in your example and use the parameter measure on the Values.
I think this could solve your problem. If you need any help, please let me know.




Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




Hi Andrade,

That is supposing I want only the sales. Actually whatever the measure would be in my table i would like to filter my dates.
So in essence if we imagine a matrix table where the dates are in the column.
The slicer should ONLY filter these dates. 

Not sure that is clear

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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