Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis Calculate Total on bar chart

Hello Everyone,

I try to create a bar chart to calculate revenue percentage for each group.The Dimension is Division.

Current Month:

=sum ( {$<[FiscalYear] = {$(#=Only(_Year))}, [FiscalMonth] = {'$(#=Only(_Month))'}, Division= >} [Revenue])

YTD:

=sum ( {$<[FiscalYear] = {$(#=Only(_Year))}, [FiscalMonth] = {"<=$(#=Only(_Month))"}, Division= >} [Revenue])


Is there a way to let the set analysis calculate the total for all Division on this bar chart?


Thank you very much in advance!


Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

Try selecting relative option on the expression tab.

or

this may be:

=Sum({$<[FiscalYear] = {$(#=Only(_Year))}, [FiscalMonth] = {'$(#=Only(_Month))'}, Division= >} [Revenue])/Sum(TOTAL {$<[FiscalYear] = {$(#=Only(_Year))}, [FiscalMonth] = {'$(#=Only(_Month))'}, Division= >} [Revenue])

View solution in original post

5 Replies
sunny_talwar
MVP
MVP

Add another bar for TOTAL? Is that what you are looking for?

Not applicable
Author

Thank you - Sunny,

I need a bar chart show (Revenue by Division)/ (Total Revenue of all the Division)

Thanks.

sunny_talwar
MVP
MVP

Try selecting relative option on the expression tab.

or

this may be:

=Sum({$<[FiscalYear] = {$(#=Only(_Year))}, [FiscalMonth] = {'$(#=Only(_Month))'}, Division= >} [Revenue])/Sum(TOTAL {$<[FiscalYear] = {$(#=Only(_Year))}, [FiscalMonth] = {'$(#=Only(_Month))'}, Division= >} [Revenue])

swuehl
Champion III
Champion III

Maybe using TOTAL qualifier:

Current Month:

=sum ( {$<[FiscalYear] = {$(#=Only(_Year))}, [FiscalMonth] = {'$(#=Only(_Month))'}, Division= >} [Revenue])

/

sum (TOTAL {$<[FiscalYear] = {$(#=Only(_Year))}, [FiscalMonth] = {'$(#=Only(_Month))'}, Division= >} [Revenue])

Not applicable
Author

Thank you very much - Sunny and swuel.

Works perfect.

You guys are great!

You have great day!