Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

Logic

Hi ALl,

Please find the attachment of the qvw file .

Here i have bar chart which has the dimesnion  defectsummaryreportperiod  this is statring form NOV ..

The requirement is like it should show the 13 months from the selected date from Orderdate and the date format is MM-DD-YYYY.

say for example now i have selcted 11-11-2017.....that means and if you look at the bar chart it is showing 13 months charts...starting from NOV 2016 to NOV 2017..

but if i select October it will show 12 months... the starting will still be NOv..

Please help me on this ...If i slect in future Dec from Orderdate then the bar chart should start from Dec... so that it will be 13 months ..

How can ia chive this ...

Thanks in advance

22 Replies
smilingjohn
Specialist
Specialist
Author

Hi Staffan ..

How is is working for you ? r u using my file the one i attached as test2 ?

if yes then can you please send it to me

stabben23
Partner - Master
Partner - Master

Like this?

amarnath_krishn
Contributor III
Contributor III

test.png

amarnath_krishn
Contributor III
Contributor III

Just made the below corrections on your version:

1. add an equal sign before the variable definition

2. Date format is 'MMM-YYYY' for the variables

smilingjohn
Specialist
Specialist
Author

Hi Staffon..

If i tried to test the same thing for 8 months or 6 months it doesnot work ...

can you please help me with this ?????

HirisH_V7
Master
Master

Hi,

Please check out, using this expression,

Sum ({<DefectSummaryReportPeriod={">=$(=Date(MonthStart(Max(DSLoadDate), -12),'MMM-YYYY'))<=$(=Date(Max(DSLoadDate),'MMM-YYYY'))"}>}DSCreateCount)

PFA,

Hirish

HirisH
“Aspire to Inspire before we Expire!”
smilingjohn
Specialist
Specialist
Author

Hi Amarnath..

This is changing the values..

I am getting all wron figures..

this is giving me the output ..but including this in an variable the values are something very wrong

The output is wrong for PROGRESS which is a runing total ..

Other than that the open and close are showing correct values

smilingjohn
Specialist
Specialist
Author

Hi Harish..

Thanks for the response..

If you see the this is giving wrong out for the 3rd expression which is a running total ..

other than this other is working ..

How do i handle this with the third expression which is a running total that is Progress

Thanks

stabben23
Partner - Master
Partner - Master

aha, change here, add DefectSummaryReportPeriod instead of DSLoadDate

Sum ({<DefectSummaryReportPeriod={">=$(=date(addmonths(DSLoadDate,-6),'MMM-YYYY'))<=$(=max(date(addmonths(DSLoadDate,0)),'MMM-YYYY'))"}>}DSCreateCount)

smilingjohn
Specialist
Specialist
Author

Hi staffan

Thanks third expression is giving wrong values which is a running total...

The other two are correct ..

How to deal with the running total expression