Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, Friends!
I need some help with a drill-down dimension I'm trying to use in my app.
I have a historical database with 2 years, in witch I must compare the results from this year (TY) and last year (LY).
I'm using a combination chart with a driil-down containing month and day dimensions, and a I have a filter where I can choose a specific date from the current year.
When no value is selected in this filter, the labels of the months are shown as a generic description of M0, M-1, M-2, M-3... (where M0 represents the month of the Presentation Date). But when I select a date value, this labels must show the real month description (FEB, JAN, DEC, NOV...)
To make this dynamic labels, I'm using expressions on the drill-down dimensions with a variable to know when a value is selected for the filter Presentation Date, so I can present the desired label.
The problem is that when using this calculated dimension, the drill-down effect doesn't work correctly, instead of presenting the days, it just present the selected month.
Below the images to illustrate the problem:
Image 1: no value selected for the filter, months in generic description
Image 2: value selected for the filter, months with correct labels for the fisrt chart
Image 3: specific month selected in the chart, instead of showing the days (like chart 2), chart 1 only shows the month:
For the Chart 2 I used this drill-down dimension:
First dimension:
=If(IsNull(MONTH_LY)=0 ,MONTH_LY ,MONTH_TY)
Second dimension:
=If(IsNull(DAY_LY)=0,DAY_LY,DAY_TY)
And for the Chart 1, this:
First dimension:
=If(IsNull($(v_PresentationDaySelection_LY))=0
,$(v_MonthDescription)
,If(IsNull($(v_PresentationDaySelection_TY))=0
,$(v_MonthDescription)
,$(v_Month)
)
)
Second dimension:
=If(IsNull(DAY_LY)=0 ,DAY_LY ,DAY_TY)
The variables are:
v_MonthDescription:
If(IsNull(MONTH_DESC_LY)=0 ,MONTH_DESC_LY ,MONTH_DESC_TY)
v_Month:
If(IsNull(MONTH_LY)=0 ,MONTH_LY ,MONTH_TY)
v_PresentationDaySelection_LY:
GetFieldSelections(PRESENTATION_DATE)
v_PresentationDaySelection_TY:
GetFieldSelections(PRESENTATION_DATE)
Anyone can help with this problem, please?
since you are selecting date then pass that date to variable and use condition
if date=vdate , JAN,else M1
or else
if(count(selectdate)=1 ,Jan,M1)