Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mohan2391
Creator II
Creator II

Latest 12 months with filters selections

Hi,

Can you please answer the following

1. How to show latest 12 months data in bar chart, which should allow users to see any month data in the 3 years of time based on selection

Ex:: Have a Bar chart & 3 years of data

        x-axis: MonthYear (MMM-YY)

        Y-axis: sum(sales)

Requirement: by default, chart should show latest 12months data i.e., from May-17 to Ar-18 as it is April 2018

but if an user selects any month from the filter, it should show that partcular month data

2. I have another bar chart in which users want to see all bars in the chart even though y-axis value is zero for a particular selection.

Ex:: Have a bar chart & 3 years of data

x-axis: MMM-YY   Y-axis: sum(sales)

Filter: Country

for India in country, there is data for only 2months, so the remaining bars are not coming when India gets selected, but users want to see all months on x-axis with zero as Y-value...

Regards

Mohan

2 Replies
chinnuchinni
Creator III
Creator III

try this:

1.

Sum({$<Month=, Year=, Date={">=$(=MonthStart(AddMonths(Max(Date),-12)))<$(=MonthEnd(Max(Date)))"}>} Sales)


and to show the particular month data when customer selectts the month.


you can try with conditional disply.


2.


for the second requirement  ,de-select the option "suppress zero values" in presentation tab.

it will show the all bars when the value is Zero also.

Anonymous
Not applicable

try this:

1.=Sum({<Date={">=$(=MonthStart(Max(Date),-11))<=$(=MonthEnd(Max(Date)))"}>} Sales )