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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ewelinag17
Frequent Visitor

Two filters for one column, filter independence.

Dear,

I have a proble.

I have a table.

ewelinag17_0-1598623286188.png

I want to create a report that will count the number of loans from the selected period and divide by the number of loans from the second selected range. One line is one loan. I want to report two filters with date selection and displayed result. I don't know how to make these two filters independent from each other. How to get it? Need I to create a new table? Can I create a measure? If so, what will it look like?

ewelinag17_1-1598623369468.png

Thank you in advance for your help.

best regards

2 ACCEPTED SOLUTIONS
AntrikshSharma
Super User
Super User

@ewelinag17  You will have to create duplicated date tables that are disconnected from the model, then use columns from these table in the slicers and then use it for filtering the dates in the table that is connected to the rest of the Model. here is an example.

 

=
VAR DisMinDate =
    CALCULATE (
        MIN ( DisconnectedDates[Dates] ),
        ALLSELECTED ( DisconnectedDates[Dates] )
    )      -- Min Date from the slicer which is using column from disconnected dates table
VAR DisMaxDate =
    CALCULATE (
        MAX ( DisconnectedDates[Dates] ),
        ALLSELECTED ( DisconnectedDates[Dates] )
    )      -- Max Date from the slicer which is using column from disconnected dates table
VAR FilterDates =
    FILTER ( ALL ( Dates ), Dates[Date] >= DisMinDate && Dates[Date] <= DisMaxDate ) 
VAR Result =
    CALCULATE ( [Measure], FilterDates )
RETURN
    Result

 

 

View solution in original post

amitchandak
Super User
Super User

@ewelinag17 , refer my blog on using two date slicers and how to compare data across those

https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@ewelinag17 , refer my blog on using two date slicers and how to compare data across those

https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
AntrikshSharma
Super User
Super User

@ewelinag17  You will have to create duplicated date tables that are disconnected from the model, then use columns from these table in the slicers and then use it for filtering the dates in the table that is connected to the rest of the Model. here is an example.

 

=
VAR DisMinDate =
    CALCULATE (
        MIN ( DisconnectedDates[Dates] ),
        ALLSELECTED ( DisconnectedDates[Dates] )
    )      -- Min Date from the slicer which is using column from disconnected dates table
VAR DisMaxDate =
    CALCULATE (
        MAX ( DisconnectedDates[Dates] ),
        ALLSELECTED ( DisconnectedDates[Dates] )
    )      -- Max Date from the slicer which is using column from disconnected dates table
VAR FilterDates =
    FILTER ( ALL ( Dates ), Dates[Date] >= DisMinDate && Dates[Date] <= DisMaxDate ) 
VAR Result =
    CALCULATE ( [Measure], FilterDates )
RETURN
    Result

 

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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