Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
gwenngannon
Contributor II
Contributor II

Bar Charting percentages in QLikview

 

 

 

HI I am looking for help to see  “ percentages of the total”  in the bar chart each month rather than just the balances

 

I have tried relative with no luck, I have tried to write an expression to divide the above expression by with no luck

 

Please help me write an expression to provide the results I’m looking for each month

 

Dimensions =  Month End

                         =  TYPE

  Expression =

 

= sum({<L_STATUS ={'NPFM'},MONTH=,QUARTER=,YEAR= , [Month End]={">=$(=AddMonths(MonthStart(vSelectedMaxDate),-3))<=$(=AddMonths(MonthEnd(vSelectedMaxDate),1))"}>}(L_BAL_NET_CURRENT))

 

EX: results per type for 05/31/2018

          CML = 20.80

          MTG = 6.63

          CNS = 1.15

          TTL = 28.58

 

   I would like this to see percentages of the total  in the chart

 

                 CML = 20.8 / 28.58 = 72.7%. ,  MTG = 6.63 / 28.58 = 23.196%...and so on

  sample chart.PNG

 

Hope these examples help -thank you

 

 

 

1 Solution

Accepted Solutions
gwenngannon
Contributor II
Contributor II
Author

I think I have it thanks for taking the time to look at it, I played with the total and added month end aggregation :

=num(sum({<L_STATUS ={'NPFM'},MONTH=,QUARTER=,YEAR= , [Month End]={">=$(=AddMonths(MonthStart(vSelectedMaxDate),-3))<=$(=AddMonths(MonthEnd(vSelectedMaxDate),1))"}>}(L_BAL_NET_CURRENT)),'$##,###')
/
SUM( TOTAL <[Month End]> {< L_STATUS ={'NPFM'},MONTH=,QUARTER=,YEAR= , [Month End]={">=$(=AddMonths(MonthStart(vSelectedMaxDate),-3))<=$(=AddMonths(MonthEnd(vSelectedMaxDate),1))"}>}L_BAL_NET_CURRENT)

View solution in original post

3 Replies
vishsaggi
Champion III
Champion III

Did you try below?

= Num(Sum(Yourexpression)/Sum(TOTAL L_BAL_NET_CURRENT), '#,##0.00')&'%'

gwenngannon
Contributor II
Contributor II
Author

thanks, yes I tried that but the percentage was by the full four months worth of balances-

gwenngannon
Contributor II
Contributor II
Author

I think I have it thanks for taking the time to look at it, I played with the total and added month end aggregation :

=num(sum({<L_STATUS ={'NPFM'},MONTH=,QUARTER=,YEAR= , [Month End]={">=$(=AddMonths(MonthStart(vSelectedMaxDate),-3))<=$(=AddMonths(MonthEnd(vSelectedMaxDate),1))"}>}(L_BAL_NET_CURRENT)),'$##,###')
/
SUM( TOTAL <[Month End]> {< L_STATUS ={'NPFM'},MONTH=,QUARTER=,YEAR= , [Month End]={">=$(=AddMonths(MonthStart(vSelectedMaxDate),-3))<=$(=AddMonths(MonthEnd(vSelectedMaxDate),1))"}>}L_BAL_NET_CURRENT)