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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
PBIfanatic
Helper V
Helper V

Missing filter context

Hi,

 

I have a set of products as shown , there is conditional formatting on these products based on a measure - count(Sub products)

 

Product ID

11
12
122
1222
21

 

When I join this to the sales table to get the sales data I get the below table

Product IDSales
12200
122500
1222121

 

With show no data I get this, but I lost the conditional formatting for product 11 and 21

Product IDSales
11 
12200
122500
1222121
21 

 

Is there a way to force that? If I addin the meausre for sub product into the table I see the highlight but I dont want to addthis in. 

Is there a way to force the filter context? thanks for your help.

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @PBIfanatic ,

 

I have built a data sample,as shown below, Table1 and Sales table have a relationship based on a Product Name:

Eyelyn9_1-1637290944167.png

Eyelyn9_2-1637290956879.png

Eyelyn9_3-1637290964375.png

And I created a measure to simply calculate the count of each Procuct.

Measure = 
var _count=CALCULATE(COUNTROWS('Table1'),ALLEXCEPT(Table1,Table1[Product ID]))
return 
SWITCH(_count,4,"light blue",3,"Red", 2,"light green",1, "Grey")

 

But sorry for that I could not reproduce your issue:

Eyelyn9_0-1637290853186.png

 

So please provide me with more details about your table  or share me with your pbix file after removing sensitive data.

 

 

Best Regards,
Eyelyn Qin
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

3 REPLIES 3
Anonymous
Not applicable

Hi @PBIfanatic ,

 

I have built a data sample,as shown below, Table1 and Sales table have a relationship based on a Product Name:

Eyelyn9_1-1637290944167.png

Eyelyn9_2-1637290956879.png

Eyelyn9_3-1637290964375.png

And I created a measure to simply calculate the count of each Procuct.

Measure = 
var _count=CALCULATE(COUNTROWS('Table1'),ALLEXCEPT(Table1,Table1[Product ID]))
return 
SWITCH(_count,4,"light blue",3,"Red", 2,"light green",1, "Grey")

 

But sorry for that I could not reproduce your issue:

Eyelyn9_0-1637290853186.png

 

So please provide me with more details about your table  or share me with your pbix file after removing sensitive data.

 

 

Best Regards,
Eyelyn Qin
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

@PBIfanatic , Try to +0 to measure and try

sum(Table[Sales]) +0

 

or do that for conditional formatting measure

Share with Power BI Enthusiasts: 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 but that didnt work. it has forced 0 to lot of other Products.

The products I had shown was based on few filters on the report page. 

Now all those filters are ignored, and shows all products and  0's against the ones that doesnt have sale amount.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.