Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team
I have requirement where user can select a month range. like(Apr2017 to Aug2017), then in that case, bar chart should display 201704 to 201708, 201604 to 201608, 201504 to 201608.
Please find attached qvw for test data.
Thanks in Advance!!!
Something like below.. I hope that you can create variables yourself.
=SUM(
{
<Year=,[Year/Month] = {">=$(=Date(AddYears(Date#(Min([Year/Month]),'YYYYMM'),0),'YYYYMM'))<=$(=Date(AddYears(Date#(Max([Year/Month]),'YYYYMM'),0),'YYYYMM'))"}>
+
<Year=,[Year/Month] = {">=$(=Date(AddYears(Date#(Min([Year/Month]),'YYYYMM'),-1),'YYYYMM'))<=$(=Date(AddYears(Date#(Max([Year/Month]),'YYYYMM'),-1),'YYYYMM'))"}>
+
<Year=,[Year/Month] = {">=$(=Date(AddYears(Date#(Min([Year/Month]),'YYYYMM'),-2),'YYYYMM'))<=$(=Date(AddYears(Date#(Max([Year/Month]),'YYYYMM'),-2),'YYYYMM'))"}>
}
[Total net sales USD])
here it is,
here you should start to evaluate and format your Time related fields in the correct format to avoid doing it in your variables and expressions.
Something like below.. I hope that you can create variables yourself.
=SUM(
{
<Year=,[Year/Month] = {">=$(=Date(AddYears(Date#(Min([Year/Month]),'YYYYMM'),0),'YYYYMM'))<=$(=Date(AddYears(Date#(Max([Year/Month]),'YYYYMM'),0),'YYYYMM'))"}>
+
<Year=,[Year/Month] = {">=$(=Date(AddYears(Date#(Min([Year/Month]),'YYYYMM'),-1),'YYYYMM'))<=$(=Date(AddYears(Date#(Max([Year/Month]),'YYYYMM'),-1),'YYYYMM'))"}>
+
<Year=,[Year/Month] = {">=$(=Date(AddYears(Date#(Min([Year/Month]),'YYYYMM'),-2),'YYYYMM'))<=$(=Date(AddYears(Date#(Max([Year/Month]),'YYYYMM'),-2),'YYYYMM'))"}>
}
[Total net sales USD])
Manish Kachhia, you are a legend!