Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Navars
Creator
Creator

chart with year,qty and month as columns

Hi All,

I want to display the chart like below, need the previous two years,  quarters in the current year and months in the current quarter. 

 

chart.jpg

Thanks in Advance..

Labels (3)
1 Solution

Accepted Solutions
Navars
Creator
Creator
Author

Thanks for your reply.

i have achieved the solution.

qliksolution.png

to achieve this, I wore a couple of calculated dimensions. please find below.

1.Year_supplier

2.=if(year([SCO Released Date])=$(=vCurrent_year_supplier),if(len([SCO Released Date])<>0, 'Q'& ceil(month([SCO Released Date])/3)),Null())

vCurrent_year_supplier = max(Year_supplier)

 3.=if(year([SCO Released Date])=$(=vCurrent_year_supplier),if(ceil(month([SCO Released Date])/3)=$(=vMax_quarter_supplier),Month_Supplier,null()),null())

vMax_quarter_supplier =max({<Year_supplier={$(=max(Year_supplier))}>}Quarter_supplier)

4.Company_site

to ristrict the data to previous two year, wrote set analysis in expression.

avg({<Year_supplier={'>=$(=vPrevious_2years_supplier)<=$(=vCurrent_year_supplier)'}>} [Review Score])

Hope it helps.

 

Regards,

Sra1..

 

View solution in original post

3 Replies
Sergey_Shuklin
Specialist
Specialist

Hello!

PFA.

You can load hardcoded table with additional dimensions:

LOAD * Inline
[
dim
1
2
3
];

After that, you can assign different calculations for each value of dim.

max_value.jpg

Yes, the result is little bit different of your expected output (there is no combined columns like Year-Quart, Quart-Month). But you can achive this by yourself if you'll have more workaround on if-conditions in dimensions/expressions.

Hope this is it.

Navars
Creator
Creator
Author

Thanks for your reply.

i have achieved the solution.

qliksolution.png

to achieve this, I wore a couple of calculated dimensions. please find below.

1.Year_supplier

2.=if(year([SCO Released Date])=$(=vCurrent_year_supplier),if(len([SCO Released Date])<>0, 'Q'& ceil(month([SCO Released Date])/3)),Null())

vCurrent_year_supplier = max(Year_supplier)

 3.=if(year([SCO Released Date])=$(=vCurrent_year_supplier),if(ceil(month([SCO Released Date])/3)=$(=vMax_quarter_supplier),Month_Supplier,null()),null())

vMax_quarter_supplier =max({<Year_supplier={$(=max(Year_supplier))}>}Quarter_supplier)

4.Company_site

to ristrict the data to previous two year, wrote set analysis in expression.

avg({<Year_supplier={'>=$(=vPrevious_2years_supplier)<=$(=vCurrent_year_supplier)'}>} [Review Score])

Hope it helps.

 

Regards,

Sra1..

 

Navars
Creator
Creator
Author

I need totals for each and every column, but i could not get the totals. can someone help to get the totals?