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: 
joffremota
Partner - Contributor III
Partner - Contributor III

Different results for same expression

Hi all.

I'm facing the following situation, and I hope someone could help me.

I've got two charts with the same expression. A simple table and a bar chart.

Figura_001.jpg

The logic that I see on the data presentation is...

On the table:

1 employee selected = R$ 229,74

2 employees selected = 229,74 + 229,74= R$ 459,49

On the bar chart:

1 employee selected = (229,74) * 1 = R$ 229,74

2 employees selected = (229,74 + 229,74) * 2 = 918,97

If I select more employees, the total cost (Custo total) on bar chart will grow exponentially, but the total cost on the table(last column) grows correctly.


The expression I'm using is:

=((Sum ({$<[Tipo de Absenteísmo]-={'Licença*'}>}SalarioContratual_Valor)*2.15)/30)*Sum (Absent_DiasMes)


Also, if I choose the dimension Employee (Associado) on the bar chart, it returns the correct value.


Hope someone help.


Regards,

Joffre Mota

1 Solution

Accepted Solutions
sunny_talwar

May be try this expression for your chart

Sum(Aggr(((Sum ({$<[Tipo de Absenteísmo]-={'Licença*'}>}SalarioContratual_Valor)*2.15)/30)*Sum (Absent_DiasMes),

Your straight table's dimension)

View solution in original post

2 Replies
sunny_talwar

May be try this expression for your chart

Sum(Aggr(((Sum ({$<[Tipo de Absenteísmo]-={'Licença*'}>}SalarioContratual_Valor)*2.15)/30)*Sum (Absent_DiasMes),

Your straight table's dimension)

joffremota
Partner - Contributor III
Partner - Contributor III
Author

stalwar1‌, worked perfectly.

Figura_002.jpg

Thank you very much!


Best regards,

Joffre Mota