Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
siva8
Contributor
Contributor

qlikview requirement

Hi Team 

can u please help with the below requirement 

have  bar chart with  month as dimension and sum(sales) as measure 

the requirement is as below 

 for example if we select march the bar chart should show from march to DEC. 

 and if we select June bar chart should show from june to dec .

and so on.. (from the selcted month to last month of the year) 

 

thanks 

siva

1 Solution

Accepted Solutions
rubenmarin

Hi Siva, you can do that with set analysis, in example, having a table with Month as number ans a Sales value the expression can be:

Sum({<Month={">=$(=Min(Month))"}>} Sales)

{<Month={">=$(=Min(Month))"}>} is the set analysis, it modifies the values selected for a particular expression, in this case it changes the values selcted in Month to select all months highre or equal to the lower month selected

When calculating Qlik  first will expand $(), so $(=Min(Month)) will be converted to the value of the minimum month selected, if selected month is '5' the expression to calculate will be:

Sum({<Month={">=5"}>} Sales)

 

View solution in original post

4 Replies
rubenmarin

Hi Siva, you can do that with set analysis, in example, having a table with Month as number ans a Sales value the expression can be:

Sum({<Month={">=$(=Min(Month))"}>} Sales)

{<Month={">=$(=Min(Month))"}>} is the set analysis, it modifies the values selected for a particular expression, in this case it changes the values selcted in Month to select all months highre or equal to the lower month selected

When calculating Qlik  first will expand $(), so $(=Min(Month)) will be converted to the value of the minimum month selected, if selected month is '5' the expression to calculate will be:

Sum({<Month={">=5"}>} Sales)

 

siva8
Contributor
Contributor
Author

Hi Ruben,

 

thanks a lot for your prompt response 

what if we have month as text instead of  number  will  same expression  work here 

 

thanks

siva

 

 

rubenmarin

Hi Siva,

No, you will need a field with month as number to make the >= comparison, if you don't have it as number you can create it in the same table, it can vary a lot (month names, date format...) but it can be something like:

Table:

LOAD Month

  Num(Month(Date#(Month,'MMM'))) as NumMonth // if month='Dec' it should store 12

...

siva8
Contributor
Contributor
Author

thank you