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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
yellowold5
Helper I
Helper I

SSAS Current week if not filtred

Hi everyone, I have a report using live connection to a tabular cube, i have 3 slicer in that report:

yellowold5_0-1720183774541.png

I want have a visuals filter if those 3 slicer is not filtred then show current week of that otherwise selected filter data.

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @yellowold5 

Assuming that the week is based on the WEEKNUM function, you can use ISFILTERED to check whether a filter is applied directly to a column. Note: returns true if a filter is appleid directly to the column specified in the argument, not when it is crossfiltered.

=
IF (
    --Filters must be directly applied to these three column in order to return the filtered value of [my measure]
    ISFILTERED ( Dates[Year] )
        && ISFILTERED ( Dates[Month] )
        && ISFILTERED ( Dates[Day] ),
    [my measure],
    CALCULATE (
        [my measure],
        FILTER ( VALUES ( Dates[Week] ), Dates[Week] = WEEKNUM ( TODAY () ) )
    )
)




Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

2 REPLIES 2
danextian
Super User
Super User

Hi @yellowold5 

Assuming that the week is based on the WEEKNUM function, you can use ISFILTERED to check whether a filter is applied directly to a column. Note: returns true if a filter is appleid directly to the column specified in the argument, not when it is crossfiltered.

=
IF (
    --Filters must be directly applied to these three column in order to return the filtered value of [my measure]
    ISFILTERED ( Dates[Year] )
        && ISFILTERED ( Dates[Month] )
        && ISFILTERED ( Dates[Day] ),
    [my measure],
    CALCULATE (
        [my measure],
        FILTER ( VALUES ( Dates[Week] ), Dates[Week] = WEEKNUM ( TODAY () ) )
    )
)




Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
elitesmitpatel
Super User
Super User

please share the file for easy refernce

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.