Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Mastering Change Data Capture: Read Now
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikview979
Specialist
Specialist

Based on selection Above all months data

Hi Experts,

Here i want the Sum(sales) based on month selection with above all months


For example:-

My variable like

Variable3=MonthName(max(Date))

expression:-

=sum({<Month={'$(Variable3)'}>}Sales)

Here if i select may month its showing may month data its fine.

my requirement is:-  if i select  APRIL i want data from April,Mar,Feb,Jan

for that i have written expression like this

=sum({<Month={'<=$(Variable3)'}>}Sales(here i am getting result is Zero)


is there any mistake in expression  ,please let me know.



36 Replies
qlikview979
Specialist
Specialist
Author

Its working for current max year.

same data should be replicate previous year also.

can you share the expression for previous year.

I will tell you with example , i want data like this

Ex:-(if i select May 2017)

Year,     Monthname   2016        2017

               Jan2016        100          0

               Feb2016        200          0

2016        Mar2016        300          0

              April2016       400          0

               May2016       500           0

               Jan2017          0            600       

               Feb2017          0            700       

2017        Mar2017          0            800       

              April2017         0            900       

               May2017         0             1000 


    

if i select June i want to show both years  from June to January.


I want dynamically changing expressions 

Anil_Babu_Samineni

Assume, If you have data Jan 2015 to Till Month

What values you are expecting to see when you click for Jan 2015 / Dec 2015.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
qlikview979
Specialist
Specialist
Author

Ok,

I have data from Jan 2015  to may 2017,

here i want show for client   Current,previous year sales only.

Assume i have data from Jan 2015  to may 2017


if i select march 2017 in 2017 i want show march,Feb,Jan   parallay  In 2016 Jan,Feb,Mar should be selected.


Regards

Mahesh

Anil_Babu_Samineni

I understand your question very first time only. Answer to my question then we will expect much

If you select Mar 2015 for your case what would be the Output? Simple Mac - Jan 2015 ??

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
qlikview979
Specialist
Specialist
Author

From 2015:-

Mar,Feb,Jan

From 2014:-

Mar,Feb,Jan

Anil_Babu_Samineni

How come you are expecting for 2014. Even you don't have data you want those, Am i right?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
qlikview979
Specialist
Specialist
Author

If i have  need to show like that, other wise 2015 only from selected month with above months.