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
Anonymous
Not applicable

Custom filter/slicer applied at page level

Hi.

 

I have a table with post_id, image_id, video_id and other columns. Similarly, I have the same as a comments table. I also have tables on votes, views, etc. for and on posts and comments. The post_id is unique and can't be null; the media_id and video_id are unique but can be null which means this particular post does not have an image or video associated with it. 

 

I want to have a custom filter/slicer called media where I can choose either an image or video and the page filters based on that. So, if I choose image, the number of posts, comments and anything related to posts or comments (such as votes, views, etc. on posts/comments, etc.), should be filtered for items that have images (so non-NULL image_ids). Same for videos. 

 

How would I best approach this? Do I have to really make multiple measure, for example, one that calculates count of posts that have a non-NULL image_id, another count of comments, count of votes, etc. etc.? Is there an easier way?

 

Thanks. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hello. Apologies for not being clear but my issues was resolved.

 

I just had to create a custom column called media where it's equal to 'image' if the post has an image, 'audio' if it has an audio file, or 'both' if it has both. I then created a slicer with that column as a filter. I was trying to do too much for a simple problem. 

View solution in original post

4 REPLIES 4
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

 Would you mind accept your solution as solutions? Then we are able to close the thread. More people who have the same requirement will find the solution quickly and benefit here. Thank you!!

 

Best Regards,
Community Support Team_ Yalan Wu

v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous 

Can you share the simple file after removing the sensitive information and the output you want to achieve?

Because I don't quite understand your question, I'm looking forward to your reply!

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hello. Apologies for not being clear but my issues was resolved.

 

I just had to create a custom column called media where it's equal to 'image' if the post has an image, 'audio' if it has an audio file, or 'both' if it has both. I then created a slicer with that column as a filter. I was trying to do too much for a simple problem. 

amitchandak
Super User
Super User

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.