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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Asmoday1507
Frequent Visitor

Ignore row filter to get list of dates to selected date

Hey everyone

 

I'm having a huge problem avoiding the row filter when selecting a specific date. For the sake of example, let's assume I have 1 table, called DIM_CALENDAR, and a measure that counts the number of days selected. If I select a specific date on the slicer, I get that one date, and I would like to get all the dates up to that selected date.

 

The only solution I can see, but is not accepted by the business, is to set the date slicer to a period up to a specific date, but unfortunately the business wants to select dates from a drop-down list.

 

My measure (not working):

CALCULATE(
    COUNT(DIM_CALENDAR[Date]),
        FILTER(
            KEEPFILTERS(VALUES('DIM_CALENDAR'[Date])),
            'DIM_CALENDAR'[Date] <= SELECTEDVALUE(DIM_CALENDAR[Date])
        )
)
But I get only one date (because one date is selected, but I wanna see all dates to this date)
 
How to write correct measure in dax?
 
My measure doesn't working:
Asmoday1507_0-1703258106576.png

I wanna see list of dates to this selected date on the right side

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Asmoday1507 ,

Based on what you’ve mentioned, to get all the dates up to that selected date, you can follow these steps:

Here are my test data:

vheqmsft_0-1703490889095.png

1.Create a calculate table

Table = VALUES('DIM-CALENDER'[Date]) 

2.Create a Slicer by using DATE column of table

vheqmsft_1-1703491172544.png

3.Create another and set to the filter of this visual(table), and set options as ‘is 1’

 Measure = VAR Selected_value = SELECTEDVALUE('Table'[Date]) RETURN IF( MAX('DIM-CALENDER'[Date]) <= Selected_value, 1, 0) 

vheqmsft_2-1703491238319.png

4.Final output

vheqmsft_0-1703491278023.png

In order for you to solve the problem faster, you can refer to the following documentation

How to Get Your Question Answered Quickly - Microsoft Fabric Community

Best Regards,
Albert He

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi  @Asmoday1507 ,

Based on what you’ve mentioned, to get all the dates up to that selected date, you can follow these steps:

Here are my test data:

vheqmsft_0-1703490889095.png

1.Create a calculate table

Table = VALUES('DIM-CALENDER'[Date]) 

2.Create a Slicer by using DATE column of table

vheqmsft_1-1703491172544.png

3.Create another and set to the filter of this visual(table), and set options as ‘is 1’

 Measure = VAR Selected_value = SELECTEDVALUE('Table'[Date]) RETURN IF( MAX('DIM-CALENDER'[Date]) <= Selected_value, 1, 0) 

vheqmsft_2-1703491238319.png

4.Final output

vheqmsft_0-1703491278023.png

In order for you to solve the problem faster, you can refer to the following documentation

How to Get Your Question Answered Quickly - Microsoft Fabric Community

Best Regards,
Albert He

 

VahidDM
Super User
Super User

Hey @Asmoday1507 

 

Try this:

All Dates to Selected = 
CALCULATE(
    COUNTROWS('DIM_CALENDAR'),
    FILTER(
        ALL('DIM_CALENDAR'),
        'DIM_CALENDAR'[Date] <= MAX('DIM_CALENDAR'[Date])
    )
)

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

LinkedIn | Twitter | Blog | YouTube 

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.