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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Niels_T
Post Patron
Post Patron

Is there an option to use different filters on data when filtering with slicers?

Hello,

 

I have data of what the customer searches on the website I use the page view metric from Google Analytics to achieve this result, however, it is so much that I put a filter on it. 

 

An example. Here I put a filter of greater than 200, this gives me a good view: 

image.png

 

 

The thing is when I filter with a slicer on date I want the filter "greater than 200" to be automatically removed because otherwise I won't see my data.

 

Example: I look at a specific date and filter greater than 200 is still active so no data:

 

image.png

 

Is this possible?

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

Hi @Niels_T ,

 

You can create a separate calendar table, and an option table.

27.png

 

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

 

28.png

 

nValue = 
IF (
    ISFILTERED ( 'Table 2'[Date] ),
    CALCULATE (
        MAX ( 'Table'[Value] ),
        FILTER (
            'Table',
            MIN ( 'Table 2'[Date] ) <= [Date]
                && [Date] <= MAX ( 'Table 2'[Date] )
        )
    ),
    IF (
        ISFILTERED ( 'Table (2)'[Slicer] ),
        CALCULATE ( SUM ( 'Table'[Value] ), FILTER ( 'Table', [Value] > 200 ) ),
        SUM ( 'Table'[Value] )
    )
)

 

 

When you don’t use the date slicer, only values greater than 200 are displayed. When you use the date slicer, the filter greater than 200 is ignored.

29.png30.png

 

 

You can check more details from here.

 

 

 

Best Regards,

Stephen Tao

 

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

 

View solution in original post

2 REPLIES 2
v-stephen-msft
Community Support
Community Support

Hi @Niels_T ,

 

You can create a separate calendar table, and an option table.

27.png

 

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

 

28.png

 

nValue = 
IF (
    ISFILTERED ( 'Table 2'[Date] ),
    CALCULATE (
        MAX ( 'Table'[Value] ),
        FILTER (
            'Table',
            MIN ( 'Table 2'[Date] ) <= [Date]
                && [Date] <= MAX ( 'Table 2'[Date] )
        )
    ),
    IF (
        ISFILTERED ( 'Table (2)'[Slicer] ),
        CALCULATE ( SUM ( 'Table'[Value] ), FILTER ( 'Table', [Value] > 200 ) ),
        SUM ( 'Table'[Value] )
    )
)

 

 

When you don’t use the date slicer, only values greater than 200 are displayed. When you use the date slicer, the filter greater than 200 is ignored.

29.png30.png

 

 

You can check more details from here.

 

 

 

Best Regards,

Stephen Tao

 

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

 

amitchandak
Super User
Super User

@Niels_T , This will sum of dates where count > 200

make sure you date do not have timestamp

 

sumx(filter(Summarize(Table,Table[date],"_1", count(Table[date]])),[_1]>200),[_1])

 

Date = [Datetime].date
or
Date = date(year([Datetime]),month([Datetime]),day([Datetime]))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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