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: 
fran_perea
Contributor II
Contributor II

show % evolutuion different products

fran_perea_0-1699885635061.png

I have several products, each of them has a % of sales.I want to display the evolution in another chart. But when i try to do it the cahrt is like this one:

fran_perea_1-1699885742871.png

As you can see the % doesn´t match between graphs. The Set Analysis formula is the same. 

(sum({<[Operation]={'Sale'},Year,MonthYear, [Wallet ID]={'A','B', 'C', 'D'}>}Amount)
-
sum({<[Operation]={'Return'}Year,MonthYear, [Wallet ID]={'A','B', 'C', 'D'}>}Amount))
/

(sum({<[Operation]={'Sale'},Year,MonthYear, [Wallet ID]={'A','B', 'C', 'D'}>} Total Amount)
-
sum({<[Operation]={'Return'},Year,MonthYear, [Wallet ID]={'A','B', 'C', 'D'}>} Total Amount)

 

Any guess what im doing wrong?

 

Thanks

 

 

 

Labels (1)
1 Solution

Accepted Solutions
marcus_sommer

You may try it with:

... Total <Year> Amount)

to consider at least one dimension - the Year - by the calculation (depending on requirement you may add Product respectively switch between dimensions).

View solution in original post

4 Replies
marcus_sommer

You may try it with:

... Total <Year> Amount)

to consider at least one dimension - the Year - by the calculation (depending on requirement you may add Product respectively switch between dimensions).

fran_perea
Contributor II
Contributor II
Author

The bar chart is the good one, the % of the Blue one should be 76% in 2023, not 25%. 

 

With the solution you suggested there is an error in the expression. 

marcus_sommer

There should be no error - did you an appropriate adjustments of the total statements within the expression?

fran_perea
Contributor II
Contributor II
Author

Yes, my bad. I didn´t introduced it properly. Now is working fine.

 

Thanks a lot!