Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
We value your feedback – take our 5-minute QlikView modernization survey
cancel
Showing results for 
Search instead for 
Did you mean: 
bhaveshp90
Creator III
Creator III

How to write filter condition in Bar and Line graph?

Hello All,

I have created the visual as shown below

Capture.PNG

How Can I filter my Value (Line Axis) expression?

My query logic is

     Case when Report_Param = 'Sales' and Header_1 = 'Budget' and Header_2 = 'UDT' then sum(Value)

     else 0

     end as Value_USD; 

any help greatly appreciated.

thanks

Bhavesh

1 Solution

Accepted Solutions
MarioCenteno
Creator III
Creator III

Try

if(SUM({<[Report_Param] ={'Sales' }>}[Value]

SUM({<[Header_2] ={'UDT' }>}[Value]),

SUM({<[Header_1] ={'Budget' }>}[Value]

View solution in original post

8 Replies
bhaveshp90
Creator III
Creator III
Author

I have used this condition but it failed,

if(Report_Param = 'Sales' and Header_2 = 'UDT' and Header_1 = 'Budget', sum(Value), 0)

MarioCenteno
Creator III
Creator III

Try

=Sum({<Report_Param ={'Sales'}, Header_2= { 'UDT'}, Header_1= { 'Budget'}>}Value)

bhaveshp90
Creator III
Creator III
Author

I tried your expression, but my line axis disappeared as shown below.

Capture.PNG

MarioCenteno
Creator III
Creator III

Try

if(SUM({<[Report_Param] ={'Sales' }>}[Value]

SUM({<[Header_2] ={'UDT' }>}[Value]),

SUM({<[Header_1] ={'Budget' }>}[Value]

bhaveshp90
Creator III
Creator III
Author

Perfect, this worked for me thank you.

Also, can you tell me how to count the project_no?

I am using count(project_no) in the bar expression which is showing incorrect no.

thanks

MarioCenteno
Creator III
Creator III

Would you use the same conditions to count the bars?

bhaveshp90
Creator III
Creator III
Author

I have two expressions,

Count (Project_No),

Value(USD) =  (if(SUM({<[Report_Param] ={'Sales' }>}[Value]

SUM({<[Header_2] ={'UDT' }>}[Value]),

SUM({<[Header_1] ={'Budget' }>}[Value])

I have used the expression given by you for my Value, now the count of project_no is not accurate.

Should I use other condition for my count ?

MarioCenteno
Creator III
Creator III

I suggest you create another post with your new challenge and I will gladly try to help you


I would also like you to explain a bit more about the lodge of your expression, I think I am not understanding correctly.