Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to create a group for a chart. My field for the dimension is
[Section Code] and I want to have the group contain anything that starts with a 1 and then create a group for anything that starts with a 2, 3,etc.
Is this possible?
This may be in the script
If(Left([Section Code],1)='1','100',
If(Left([Section Code],1)='2','200',
If(Left([Section Code],1)='3','300',
)
)
) as Grouping
Can you show us some sample data and expected output? You want the groups created in Script ?
create cyclic or drill down group like ...
having below calculated dimensions
wildmatch(dim,'*1*')
wildmatch(dim,'*2*')
[Section Code]
101
102
103
104
So I would want to group those together in a group called 100 Level
In script would be better than in chart, yes, thank you.
Maybe something like: left([Section Code],1) where it might be more suitable to create this kind of categories within the script.
- Marcus
If I look on your last example something like: ceil([Section Code] / 100) * 100 might work better as string-functions.
- Marcus
This may be in the script
If(Left([Section Code],1)='1','100',
If(Left([Section Code],1)='2','200',
If(Left([Section Code],1)='3','300',
)
)
) as Grouping
Try this:
LOAD *, IF(WildMatch(SectionCode, '1*'), SectionCode) AS [100 Level],
IF(Not WildMatch(SectionCode, '1*'), SectionCode) AS [Level2]
INLINE [
SectionCode
101
102
103
104
105
107
201
203
204
300
330
340
350
];