Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator III
Creator III

Creating Calculated Dimension - Multiple Conditions in Multiple IF Statements in LOAD

Trying to create a calculated dimension in my load script but I know that some of the syntax below is not correct. Any pointers would be helpful

If([Major Category]='152621*' AND [Net Bookvalue]= '0', 'IT',

    If([Major Category]-='152621*' AND [Major Category] < '15400000' AND [Net Bookvalue] = '0', 'Other')) AS [Depreciated Category]

Thank you,

- dave

1 Solution

Accepted Solutions
Highlighted
Not applicable

Re: Creating Calculated Dimension - Multiple Conditions in Multiple IF Statements in LOAD

Try like below:

If( WildMatch([Major Category],'152621*') AND [Net Bookvalue]= '0', 'IT',

    If(NOT WildMatch([Major Category],'152621*') AND [Major Category] < '15400000' AND [Net Bookvalue] = '0', 'Other')) AS [Depreciated Category]

View solution in original post

5 Replies
Highlighted

Re: Creating Calculated Dimension - Multiple Conditions in Multiple IF Statements in LOAD

May be this:

If([Major Category] like '152621*') and [Net Bookvalue] = 0, 'IT',

If(not [Major Category] like '152621*' and [Major Category] < 15400000 and [Net Bookvalue] = 0, 'Other')) as [Depreciated Category]

Highlighted

Re: Creating Calculated Dimension - Multiple Conditions in Multiple IF Statements in LOAD

Try with

If([Major Category]='152621*' AND [Net Bookvalue]= '0', 'IT',

    If(Wildmatch([Major Category],'152621*')=0 AND [Major Category] < '15400000' AND [Net Bookvalue] = '0', 'Other')) AS [Depreciated Category]

Highlighted
Not applicable

Re: Creating Calculated Dimension - Multiple Conditions in Multiple IF Statements in LOAD

Try like below:

If( WildMatch([Major Category],'152621*') AND [Net Bookvalue]= '0', 'IT',

    If(NOT WildMatch([Major Category],'152621*') AND [Major Category] < '15400000' AND [Net Bookvalue] = '0', 'Other')) AS [Depreciated Category]

View solution in original post

Highlighted
Creator III
Creator III

Re: Creating Calculated Dimension - Multiple Conditions in Multiple IF Statements in LOAD

Issue was with the first if statement - the 152621* did not work to identify IT assets

Highlighted

Re: Creating Calculated Dimension - Multiple Conditions in Multiple IF Statements in LOAD

Not WildMatch() can be deceptive. Make sure there are no Nulls in Major Category.

Look here: Null Value with Match/WildMatch and Like