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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
YunJ
Post Prodigy
Post Prodigy

How to exclude other rows I don't want?

Hi,

I wrote a measure.

When slicer Category="Makeup", the Store would be MNY, 3CE, LRL MU.

Capture.PNG

When slicer Category="Skincare", the Store would be LRL FSS, MG, SGMB.

Capture2.PNG

Then I want to rank them from all the store names, so I wrote a RANKX measure as following.

The problem is, the rank numbers for those 3 stores per category are correct, but why other stores also show here? 

Is there any solution to exclude other stores?

Capture3.PNGCapture4.PNG

 

Thanks a lot for your time!

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @YunJ ,

 

Try to create a measure and apply it in the visual level filter.

if(not(isblank(measure))),1,0)

test_visual_level_filter5.PNG

 

Best Regards,
Liang
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-lianl-msft
Community Support
Community Support

Hi @YunJ ,

 

Try to create a measure and apply it in the visual level filter.

if(not(isblank(measure))),1,0)

test_visual_level_filter5.PNG

 

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

Hi @V-lianl-msft 

It seems like I can simply put "measure is not blank" to the Filter Pane. 

Thanks a lot for your solution!

Capture.PNG

amitchandak
Super User
Super User

@YunJ , Try like

measure = calculate(sum(Blue[GV]), filter(Blue,
(Blue[Category]="Makeup" && Blue[Store] in {"MNY", "3CE", "LRL", "MU"}) ||
(Blue[Category]="Skincare" && Blue[Store] in {"LRL", "FSS", "MG", "SGMB"})
))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak 

 

Thanks for your reply.

Actually the Category is in Category table, and the Store is in Store table. I made relationships for those two and the blue table.

 

Also, I already successfully wrote a sum(GMV) measure, only cannot write a RANKX measure for the selected Category and Store.

 

Thanks for your time.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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