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 theChart 2I 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 theChart 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)
I'm using it this way, but the problem is that a variable in the calculated dimension (or using the GetFieldSelections () function directly) makes the drill down dimension to get lost to show the data correctly, as it can be seen in the Chart 1 of the Image 3 above, where instead of showing the days values, as in Chart 2, it's just exhibiting the consolidated month.