Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
cancel
Showing results for 
Search instead for 
Did you mean: 
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

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

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

Creator III
Creator III

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