Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
nikhilgarg
Specialist II
Specialist II

When do we use conditional expression?? Example ??

Hey,

When do we use conditional expression??

Can anyone plz tell me with an example ??

I am using personal edition of qlikview so can not open any other qvw.

Thanks

1 Solution

Accepted Solutions
jagan
Partner - Champion III
Partner - Champion III

Hi,

You can use below link and check the Report tab, there it is implemented, you can download this and you don't need license for this.

ap-a.demo.qlik.com/QvAJAXZfc/opendoc.htm?document=qvdocs%2FWhats%20New%20in%20QlikView11.qvw&host=demo11&anonymous=true

Regards,

Jagan.

View solution in original post

11 Replies
its_anandrjs
Champion III
Champion III

Hi,

Let assume simple table where it has Year, Customers and Sales amount

1. Conditionally want Amount sum for only customer C2 and C3 then by SET analysis we can use

sum({<Customers={'C2','C3' }>} Amount)

2, Second conditionally want sum of from last year upto the records in DB

sum({<Year={'<=$(=Max(Year)-1)' }>} Amount)

Inline table

LOAD * Inline

[

Customers,Amount,Year

C1,4585,2011

C2,1256,2012

C3,1256,2013

C4,1256,2014

]

And tables

Query2.png

And there are so many condition and querys

Regards

Anand

nikhilgarg
Specialist II
Specialist II
Author

Hey,

Thanks but i am asking about when to use Conditional tab in Expression tab ??

Not applicable

In ad-hoc report case you can use conditional expression

vinay_hg
Creator III
Creator III

in simple eg. with if condition

for eg u are calculating tax on sold items.

if item is electronix 14% tax and cloths 5% and others 3% tax to be applied and have to show the total tax on items sold

now ur tax exp=

sum(if(itemtype='electronics', amount*0.14 , if(itemtype='cloths', amount*0.05, amount*0.03)))

something like this..

vardhancse
Specialist III
Specialist III

In ad-hoc reporting will use conditional expressions.

Condition is that on selection of dimension & KPI they should be displayed in the chart.

We can keep layout condition that on at least one dim/KPI selection only chart can be displayed.

its_anandrjs
Champion III
Champion III

There are many options for this but  mainly we use the if conditions for the Conditions in Aggregation functions as well as any other functions also. I explain in example about the conditional expression where SET analysis works for select some set and deselect some set and give result. And in Conditional tab in which aspect you asking it in dashboard sheet or it is in any object.

Regards

Anand

jagan
Partner - Champion III
Partner - Champion III

Hi,

Check this thread

http://community.qlik.com/docs/DOC-5404

Also check What's new in Qlikview 11 Demo file, and

Regards,

Jagan.

jagan
Partner - Champion III
Partner - Champion III

Download that Dashboard using below link, you don't need license to open this file.

QlikView

and check the Reports tab.

Regards,

Jagan.

nikhilgarg
Specialist II
Specialist II
Author

HEy,

I am using Personal Edition so cannot open your attached .qvw at this link.

Can you explain here ??

Thanks