Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi dears,
In a chart, I have a grouped dimension named Periodic with the 3 following groups on a date field:
1. =date(date#(Date,'DD/MM/YYYY'),'DD / MM')
2. =replace(Week, 'W', 'week ')
3. =date(date#(MonthName,'MMM YY'),'MM / YYYY')
When user selects the group =date(date#(Date,'DD/MM/YYYY'),'DD / MM') on the chart i need to set a variable value vGroupPeriodic = 1
When user selects the group =replace(Week, 'W', 'week ') on the chart i need to set a variable value vGroupPeriodic = 2
When user selects the group =date(date#(MonthName,'MMM YY'),'MM / YYYY') on the chart i need to set a variable value vGroupPeriodic = 3
In a text box, I try the following if comparison but its not working:
=
if('['&GetCurrentField([Periodic])&']' = '[=date(date#(Date,'DD/MM/YYYY'),'DD / MM')]', 1, if('['&GetCurrentField([Periodic])&']' = '[=replace(Week, 'W', 'week ')]', 2, 3) )
Can you please help?
Thanks in advance
you can use wildmatch to check your group
=
if(wildmatch(GetCurrentField(Periodic), '*date(date#(Date*'), 1,
if(wildmatch(GetCurrentField(Periodic), '*replace*'), 2,
3))
Hi Ashley,
you have to create Periodic group field in data modeling level, then you will achieve the result.
Kindly refer my attachment file.
Thanks,
Muni
Hi
I would put GetCurrentField([Periodic]) in a text box and confirm the results match your expression. In another text box, you could build the expression step by step.
However, it would be far simpler (and better performing) if you created these calculated dimensions as fields when you load the calendar.
HTH
Jonathan
you can use wildmatch to check your group
=
if(wildmatch(GetCurrentField(Periodic), '*date(date#(Date*'), 1,
if(wildmatch(GetCurrentField(Periodic), '*replace*'), 2,
3))
Wow cool thanks lots man it works