Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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]
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]
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]
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]
Issue was with the first if statement - the 152621* did not work to identify IT assets
Not WildMatch() can be deceptive. Make sure there are no Nulls in Major Category.
Look here: Null Value with Match/WildMatch and Like