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
Dunner2020
Post Prodigy
Post Prodigy

Filter on the page level

Hi there,

 

I got event-related data. I am displaying information about how many events conducted. What was the total length or duration of the event? How many events got canceled? etc.

In the data, I have a column named 'Duration'. I am applying a filter at the page level that only displays the data when the 'Duration' column value is greater than 0. However, when the event is canceled, the Duration has a value of 0. Because I set the filter at the page level that the 'Duration' column should be greater than 0, so it stopped displaying canceled related events.

I know I could not create measures related to filtering and apply them at the page level. Is there any way that I could set the filter at the page level with something like:

                                                        Table[Duration]>0 & not(isblank(Table['Canceled Event date']))

 

1 ACCEPTED SOLUTION

Hi @Dunner2020 

If you want to count cancelled event, you can build a meausure by all function.

My sample:

1.png

If we add Duration into page filter field and set it show items when value <>0.

Count of Cancelled Event will be 0.

Measure:

Count cancelled event =
CALCULATE (
    COUNT ( 'Table'[Cancelled Event] ),
    FILTER (
        ALL ( 'Table' ),
        NOT ( ISBLANK ( 'Table'[Cancelled Event] ) )
            && 'Table'[Duration] = 0
    )
)

Result is as below.

2.png

If this reply still couldn't help you solve your problem, please show me a sample like yours or share your pbix file with me by your Onedrive for Business. And you can show me a screenshot of the result you want.

This may make it easier for me to understand your requirement.

 

Best Regards,

Rico Zhou

 

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

4 REPLIES 4
v-rzhou-msft
Community Support
Community Support

Hi @Dunner2020 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.

 

Best Regards,

Rico Zhou

Dunner2020
Post Prodigy
Post Prodigy

@MattAllington thanks for your reply. So there was a typo in my question. I wanted and (&) operator, not the OR operator. I created a column in the query editor (as you advised) and set the value of the column to 1 when both conditions satisfied. The problem is that if the Duration column not 0 filter already applied at the page level and I dragged the new column to filter page filter, it only shows the 0 values of the new column. Not the 1 values as shown in the following picture. Cancelled Events is the new calculated column. 

 

leo_89_0-1607983771773.png

 

Hi @Dunner2020 

If you want to count cancelled event, you can build a meausure by all function.

My sample:

1.png

If we add Duration into page filter field and set it show items when value <>0.

Count of Cancelled Event will be 0.

Measure:

Count cancelled event =
CALCULATE (
    COUNT ( 'Table'[Cancelled Event] ),
    FILTER (
        ALL ( 'Table' ),
        NOT ( ISBLANK ( 'Table'[Cancelled Event] ) )
            && 'Table'[Duration] = 0
    )
)

Result is as below.

2.png

If this reply still couldn't help you solve your problem, please show me a sample like yours or share your pbix file with me by your Onedrive for Business. And you can show me a screenshot of the result you want.

This may make it easier for me to understand your requirement.

 

Best Regards,

Rico Zhou

 

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

You can add a calculated column to the data. Add an if statement that classifies the data you want to show, then use that to filter the page. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

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.