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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

conditional sorting of the rows of a dimension which has been transposed to make the columns in a pivot table

hi

I have developed a report in which i have used a  calculated dimension to make columns for the expression by transposing it,

year_cd & '-' & month_cd, this calculated dimension has been created. its value is like this py-jan,py-feb...

.....py-dec.

Now the data is refreshed after every month, and the reports are based on the data of the 12 months.

i need to show this dimension in a pattern which changes every month, its like

for jan, it must start with py-jan,py-feb......

for feb,it must start with py-feb,py-mar........py-jan.

and so on till december.

How can i achieve that????

1 Reply
edg_baltazar
Partner - Creator
Partner - Creator

You could use  'Now()' function to create a Variable that returns the present date and hour, you could make a variable that contains the actual YearMonth and another that contains the December of the actual year ... something like this ... vActualYearMotnh=Year(Now())&Month(Now())  and vDecYearMonth=Year(Now())&12... then in the expression of your chart you have to use Set Analysis to indicate that you only want to show the data that is in this interval of variables (>=vActualYearMotnh<=vDecYearMonth), Hope this can help you! , Regards!