Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
sdaniels0606
Contributor III
Contributor III

Show last year labels

Hello,

I have a Bar Chart with two expressions, the first one is  showing the bars and the second one only values on data (The labels).

My second expression is:

Alt(

  Num(

       (Sum({<Year={'$(=Max(Year))'}>} PNC_S) - above(Aggr(Sum({<Year={'$(=Max(Year)-1)'}>} PNC_S), Month, Year)))

            /  

        above(Aggr(Sum({<Year={'$(=Max(Year)-1)'}>}  PNC_S), Month, Year))

   ,'#,%')

,' ')

This is showing the change of PNC between the last two years.

Captura.PNG

The problem is that it is not showing data from the months where 2017 doesnt exist.

I think a solution would be to evaluate for every month if there is any 2017 data.

13 Replies
MK_QSL
MVP
MVP

sdaniels0606
Contributor III
Contributor III
Author

I dont need to generate new data, I just want to avoid the month/year without data.

MK_QSL
MVP
MVP

What are the dimensions you have used?

sdaniels0606
Contributor III
Contributor III
Author

Month and Year

Anil_Babu_Samineni

May be remove Aggregation with the Month & Year on expression or else you may sure to provide the sample data which demonstrates the output

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
MK_QSL
MVP
MVP

So you don't want to show Month where data is not present?

If yes, you can select Month in dimension tab and tick Suppress When Value is null.

If this is not what you are looking for.. Kindly explain briefly.

sdaniels0606
Contributor III
Contributor III
Author

I cant remove Aggregation because I have a wider datebase, so It helps me to compare data from same months and different years.

Anil_Babu_Samineni

So, then try Manish latest way or can you describe more for your intend to do with Highlighted one in yellow for your Original post

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
sdaniels0606
Contributor III
Contributor III
Author

Maybe I did not express myself too clear.

I need to show one label for every month. The label has to be the difference between the last 2 years. Like the one highlighted. But, Its only showing  the label highlighted. I think its because Its the only month that have 2017 data.