Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculated margin in chart dissapeared after selection

Hi,

We have a strange result when we are calculating cumulated margin into a chart for year and year-1.

When we select no year (by default we take the highest year) the chart is showing us the result for the year 2014 and 2013 and he shows us all the months.

If we selected 2014 as year he only shows us the first four months of 2014 and 2013. The last eight months of 2013 has dissapeared.

Are we doing something wrong or is it because there is no data for 2014 for the last eight months available that he cannot show us 2013?

Kind regads

Michael

1 Solution

Accepted Solutions
Not applicable
Author

Michael,

look for attachment.

I hope that helps you.

If you select year 2014, then only 4 months are possible.

So, even in your very, very big if for year 2013 in cumulated margin other months are not present.....

You may try solution i proposed in expression "Marge $(=(année)-1)".

only({1} [and here your biggest if i have ever seen ] ) should work. But test it, please....

I can suggest you also, especially if you plan to have bigger data volumes in this application, to find more ellegant way for you calculations!!

Please let me know if it resolves your question and if it is helpful for you.

If you want to look for more efficient expressions and data models, please create new thread and let me know about it

regards

Darek

View solution in original post

3 Replies
Not applicable
Author

Michael,

look for attachment.

I hope that helps you.

If you select year 2014, then only 4 months are possible.

So, even in your very, very big if for year 2013 in cumulated margin other months are not present.....

You may try solution i proposed in expression "Marge $(=(année)-1)".

only({1} [and here your biggest if i have ever seen ] ) should work. But test it, please....

I can suggest you also, especially if you plan to have bigger data volumes in this application, to find more ellegant way for you calculations!!

Please let me know if it resolves your question and if it is helpful for you.

If you want to look for more efficient expressions and data models, please create new thread and let me know about it

regards

Darek

Not applicable
Author

Sorry, i forgot about attachment

Not applicable
Author

Dariusz,

Thanks it's exactly what i'm looking for.

I know only 4 months for 2014 are possible but it is strange that when you select no year but you fill the variable with 2014 it is showing all the months.

I suppose that when you want showing data that are not available you have to use the only function?

I have created a new thread for having more efficient expressions

Efficient expression and data model for QVW (cumulated margin by month)

Kind regards

Michael