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: 
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!


1 Solution

Accepted Solutions
sunny_talwar

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

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

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
MVP
MVP

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!