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

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

Reply
Anonymous
Not applicable

How to do filter after filtering in the expression?

Hello,

 

I have a matrix with Region, Report as the dimension and the expression is given below;

 
Test Value =

 

IF(

(SELECTEDVALUE(POC[Report]) = "Gross Profit in % of Sales"),

(CALCULATE(SUM(POC[Value ($)]), FILTER(POC, POC[Report] = " Gross Profit"))

/

CALCULATE(SUM(POC[Value ($)]), FILTER(POC, POC[Report] = " Sales"))) ,

Sum(POC[Value ($)])

)

 

Logic: For all the Report Parameters the Values = Sum(Values) except for Gross Profit in % of Sales.

For Gross Profit in % of Sales, the value is Sum(Gross Profit)/Sum(Sales)

 

But the Report Parameter = "Gross Profit in % of Sales" is filtering out from my table as shown below;

Capture.PNG

 

 

 

 

 

 

 

 

 

What wrong am I doing here? 

 

any help is appreciated

 

thanks

Bhavesh

1 REPLY 1
v-juanli-msft
Community Support
Community Support

Hi @Anonymous

As tested with my example data, some parts of the formula are wrong to result as you expected.

 

SELECTEDVALUE = IF(SELECTEDVALUE(Sheet4[report])="Gross Profit in % of Sales",1,0)
Gross Profit = CALCULATE(SUM(Sheet4[value]), FILTER(Sheet4,Sheet4[report]= "Gross Profit"))
Sales = CALCULATE(SUM(Sheet4[value]), FILTER(Sheet4,Sheet4[report]= "Sales"))
g/s = [Gross Profit]/[Sales]

12.png

 

I can't find Report Parameter = "Gross Profit in % of Sales" in the table.

I'm confused by the  this sentence:

But the Report Parameter = "Gross Profit in % of Sales" is filtering out from my table

 

And what you'd like to see in the chart, could you kindly give me an example of dataset and result visual which you could create  manualy in the excel to give me some refernce?

 

Best Regards

Maggie

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.