Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

How to avoid filtering in my expression ?

Hello, 

 

I have the expression as shown below;

 

Test Value = IF(SELECTEDVALUE(POC[Report Param]) = "Gross Profit in % of Sales", (CALCULATE(SUM(POC[Value ($)]), FILTER(POC, POC[Report Param] = " Gross Profit")) / CALCULATE(SUM(POC[Value ($)]), FILTER(POC, POC[Report Param] = " Sales"))) , Sum(POC[Value ($)])) 

 

I need to calculate the Value for Gross Profit in % of Sales as Gross Profit/Sales. 

 

(Logic: Value is Sum of all the values for all Report Parameters except Gross Profit in % of Sales, For Report Parameters except Gross Profit in % of Sales the value is average of the Values)

 

But my expression is filtering out the Gross Profit in % of Sales from the table, how to resolve this? 

 

any help is appreciated,

 

thanks

Bhavesh