

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
% percent Bar charts
Hi all,
Below is my data in pivot table format in QV, i would like to show data in percentage next to no of Transactions column. % of each group should be respect Segments and another percentage w.r.t Total.
Same pivot chart also needs to be changed to Bar chart with stacked. Both bars has to be scaled to 100%.
Segment | Group | # of Transactions |
Segment1 | 2-3 | 313629 |
3-4 | 104418 | |
>4 | 993945 | |
Segment2 | 2-3 | 462818 |
3-4 | 173109 | |
>4 | 1286426 |
Accepted Solutions

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Manoj,
Try this expressions
=Sum(Transactions)/Sum( TOTAL <Segment> Transactions)
Regards,
Jagan.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
= sum (# of Transactions)
then
in expression tab check -> the relative option

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI Manoj
write another expression as below
=sum(Transactions)/sum( total Transactions)
then go to properties -> Number tab
in that select above expression and in right panel select number or interger or decimal limit and
enable the check box show in %
there you go
Regards


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This will not work, as it calculates % on entire data. But my requirement is to calculate % of each group in each segment

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Manoj,
Try this expressions
=Sum(Transactions)/Sum( TOTAL <Segment> Transactions)
Regards,
Jagan.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
=Sum(Transactions)/Sum( TOTAL <Segment> Transactions)
I tried same expression as you have mentioned, but i had use distinct key in Sum to take unique transactionIds.
With Out distinct it is providing expected result.
In that case, the above formula is not working. Do you have any idea, why is this ?

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
If you are counting the transactions the use Count() like below
=Count( Distinct Transactions)/Count( TOTAL <Segment> Distinct Transactions)
Regards,
Jagan.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Jagan,
It was my mistake, Relative check box in expression & percentage in number format both were checked. Because of this getting wrong value.

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
If you are using below expression then you should not select the Relative option
=Count( Distinct Transactions)/Count( TOTAL <Segment> Distinct Transactions)
If you got the solution please close this thread by giving Correct and Useful answers to the posts which helps you.
Regards,
Jagan.
