Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Month columns

Hi,

I have to create 3 Months as columns as per selected Month.

If I select Jan, it should show Jan Feb March as column.

for this, I have created Month as a column in dimension and on expressions side I have written expression as

sum({< Month = {'>=$(=(Max(Month))) <=$(=(Max(Month)+2))'}>} SalesValue)

This is working fine and it is showing correct months Jan Feb and March as columns.

But the problem is when I select month as Dec.

When I select Dec, it shows only Month as Dec, where as it should show Dec 2012, Jan 2013 and Feb 2013.

So how to accomplish it?

7 Replies
Not applicable
Author

I found the solution for my problem.

I handled the scenario if selected month is Dec.

But now I have another problem.sub Columns.PNG

Here I have pivoted Column1, Sub Column row and the last row.

so in short all the columns for values are pivoted.

Here the problem is for Amt and % column.

In the expression if I write as "if(SubSubCol =  'Amt', write the expression, 0)

But it is not working. all values are 0.

Please can any one help me on this issue?

If my approach to display data as per above format is incorrect, then please correct me in that case also.

khag_hs
Contributor II
Contributor II

Lade das Datum mal als "monthname". Normalerweise sollte dann der Monat mit Jahr angezeigt werden (evtl. muss das Monatsformat im Skript angepasst werden).

Wie sehen denn Deine Originaldaten aus?

khag_hs
Contributor II
Contributor II

Lade das Datum mal als "monthname". Normalerweise sollte dann der Monat mit Jahr angezeigt werden (evtl. muss das Monatsformat im Skript angepasst werden).

Wie sehen denn Deine Originaldaten aus?

khag_hs
Contributor II
Contributor II

Lade das Datum mal als "monthname". Normalerweise sollte dann der Monat mit Jahr angezeigt werden (evtl. muss das Monatsformat im Skript angepasst werden).

Wie sehen denn Deine Originaldaten aus?

Not applicable
Author

try this - see attached

Not applicable
Author

Thanks to both of you for the reply.

But you both replied to my earlier Q. The solution for which I found, displaying month with year solved my problem.

But now I have another problem.

Please can you check my 2nd post.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     This is because there is no selection in field SubSubCol.

     This expression will work only if you select Amt in field SubSubCol.

     post your application for more help and understanding of your data.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!