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.
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']))
Solved! Go to Solution.
Hi @Dunner2020
If you want to count cancelled event, you can build a meausure by all function.
My sample:
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.
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.
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
@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.
Hi @Dunner2020
If you want to count cancelled event, you can build a meausure by all function.
My sample:
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.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
99 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |