Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
bhaveshp90
Creator III
Creator III

How to do filter after filtering in the expression?

Hello,

I have a table with Region, Report_Parameters as the dimension and the expression is given below;

if

(

Report_Param = 'Gross Profit in % of Sales',

((Sum({< Report_Param = {'Gross Profit'}>}Value))

/

(Sum({< Report_Param = {'Sales'}>}Value))),

Sum(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;


1.PNG

What wrong am I doing here?

thanks

Bhavesh

1 Solution

Accepted Solutions
sunny_talwar

Try this

If(Report_Param = 'Gross Profit in % of Sales',

((Sum(TOTAL <MonthField, BudgetForcastField> {< Report_Param = {'Gross Profit'}>}Value))

/

(Sum(TOTAL <MonthField, BudgetForcastField> {< Report_Param = {'Sales'}>}Value))),

Sum(Value)

)

Where MonthField and BudgetForcastField are the fields from your chart

Capture.PNG

View solution in original post

2 Replies
sunny_talwar

Try this

If(Report_Param = 'Gross Profit in % of Sales',

((Sum(TOTAL <MonthField, BudgetForcastField> {< Report_Param = {'Gross Profit'}>}Value))

/

(Sum(TOTAL <MonthField, BudgetForcastField> {< Report_Param = {'Sales'}>}Value))),

Sum(Value)

)

Where MonthField and BudgetForcastField are the fields from your chart

Capture.PNG

bhaveshp90
Creator III
Creator III
Author

Wow, it worked just like that. thank you Sunny for the solution