Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted

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
Highlighted

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

Highlighted
Creator III
Creator III

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