Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Percentage Bar Chart does not work when using =monthname

Hi everyone,

I am making a stacked bar chart and trying to show percentages.

the function is as follows:

Sum(sessions1)/Sum(TOTAL <browse_date> sessions1).

When using the date dimension everything is fine, because each day is measured as 100% (image 1.1), however once i change to =monthname(date) the chart changes into 100% for the total data (image 1.2).

Can someone point out what i might have done wrong?

1.1.PNG1.2.PNG

jiofi unlock firmware downloadsites like worldstar

2 Replies
Nicole-Smith

It's because browse_date is no longer your dimension.

I would solve this by creating a month field in the script using monthname(browse_date) as browse_month, then update your chart to use the browse_month field as dimension and Sum(sessions1)/Sum(TOTAL <browse_month> sessions1) as expression.

rahulgoyal1287
Contributor III
Contributor III

I have developed similar type of charts already

You can develop a calculated field to get the month at the script level:

Date(MonthStart(browse_date),'MM-YYY') as browse_month

& you may use this dimension as following at expression level:

Sum(sessions1)/Sum(TOTAL <browse_month> sessions1)

and  ofcourse, please select the dimension as browse_month


Hope this helps.