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

Expression in bar chart

Hi ,

I am trying to write an expression in a bar and line combo chart.

when I am writing below expression the value is coming different in the chart and different in Straight table.

Expression in Straight table- I have Region as a dimension in staright table which is having value apac and emeia.

Premium value : NUM(ROUND(SUM({<Month=,TDimMonth.PrevFiscalMonth=P(TMonth.FiscalMonth)>}TSummary.Value)))

Expression in Bar Chart

Premium Value : Sum({<Month=,TMonth.PrevFiscalMonth=P(TMonth.FiscalMonth)>}if(Region='APAC',TSummary.Value))

Sum({<Month=,TMonth.PrevFiscalMonth=P(TMonth.FiscalMonth)>}if(Region='EMEIA',TSummary.Value))

Please help how can i write the expression in bar chart which will give the same value as in straight table.

1 Solution

Accepted Solutions
PrashantSangle

in both chart are you using same dimension?

By the way you can optimize your expression like.

Sum({<Region={'APAC'},Month=,TMonth.PrevFiscalMonth=P(TMonth.FiscalMonth)>}TSummary.Value)

Sum({<Region={'EMEIA'},Month=,TMonth.PrevFiscalMonth=P(TMonth.FiscalMonth)>}TSummary.Value)

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Hi Nikita,

Pls share the sample data so that I can try for solution

Thank you.

PrashantSangle

in both chart are you using same dimension?

By the way you can optimize your expression like.

Sum({<Region={'APAC'},Month=,TMonth.PrevFiscalMonth=P(TMonth.FiscalMonth)>}TSummary.Value)

Sum({<Region={'EMEIA'},Month=,TMonth.PrevFiscalMonth=P(TMonth.FiscalMonth)>}TSummary.Value)

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Anonymous
Not applicable
Author

Thanks Prashant.

It worked.