Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

stefano_bianche
New Contributor II

Fields comparison

Hi all!

I need information about an error caused by a comparison on two fields.

the formula I used is the following:

if(Sum(Fatturato) <>  sum(AdHoc_TotaleFattura), 'Totale Diverso', 'Totale Uguale')

My problem is that on equal values 0 ​​it does not bring me 'Totale Uguale' but 'Totale Diverso' (I attach the table).

I also carried out a CAST on both indicted fields (DECIMAL (10.2)) but I can not fix the situation.

Can you give me a hand?

Thank you all

Tags (1)
1 Solution

Accepted Solutions
MVP
MVP

Re: Fields comparison

Or this

If(Round(Sum(Fatturato), 0.01) <> Round(Sum(AdHoc_TotaleFattura), 0.01), 'Totale Diverso', 'Totale Uguale')

2 Replies
MVP
MVP

Re: Fields comparison

May be this

If(Round(Sum(Fatturato)) <> Round(Sum(AdHoc_TotaleFattura)), 'Totale Diverso', 'Totale Uguale')

MVP
MVP

Re: Fields comparison

Or this

If(Round(Sum(Fatturato), 0.01) <> Round(Sum(AdHoc_TotaleFattura), 0.01), 'Totale Diverso', 'Totale Uguale')

Community Browser