Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Not applicable
Author

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
sunny_talwar

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]

alexandros17
Partner - Champion III
Partner - Champion III

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]

Not applicable
Author

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]

Anonymous
Not applicable
Author

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

sunny_talwar

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

Look here: Null Value with Match/WildMatch and Like