Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
Trying to achieve the below, I have a combo chart with 2 dimensions (1 of which is alternate dimension) and 2 measures.
Dim1 is Date and Dim2 is Weekstart
Measure:
if((GetSelectedCount(weekstart)) >0,
// Logic for when weekstart is selected
(Sum({<weekstart = {">=$(=Date(max(weekstart)-49)) <= $(=Date(max(weekstart)))"}>} value1) +
Sum({<weekstart = {">=$(=Date(max(weekstart)-49)) <= $(=Date(max(weekstart)))"}>} value2)),
if((GetSelectedCount(date)) >0,
// Logic for when full_date is selected
(Sum({<date= {">=$(=Date(max(date)-13)) <= $(=Date(max(date)))"}>} value1) +
Sum({<date= {">=$(=Date(max(date)-13)) <= $(=Date(max(date)))"}>} value2)),
// Default logic if neither is selected
(Sum({<date= {">=$(=Date(max(date)-13)) <= $(=Date(max(date)))"}>} value1) +
Sum({<date= {">=$(=Date(max(date)-13)) <= $(=Date(max(date)))"}>} value2))
)
)
I am trying to set expression in such a way that by default the chart should show last 14 days, and when select date or week is selected the last 14 days and 7 weeks from the date selected. By default expression works perfect, it's just when I select any date in the filter it gives me extra dates in the chart.
Hi @AuroraK,
Could you please create a simple bar chart, put date on dimension and create a simple measure such as sum(sales). Then pick a couple of date and provide a screenshot if same issue occured. If its not the problem may be occured from the additional dimension.
Thanks,
Ramazan