Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum on a field containing ONLY? 2x ONLY?

Hi,

I need to use SUM DISTINCT on a field which is an ONLY expression. Whatever I try doesn't seem to work. Anyone ideas?

And then I also need to wrap another ONLY around that field that alreay contains ONLY. Sot 2 separate questions.

I just can't get it right - no errors but it doesn't work either and I've been trying a lot.

Thanks for tips!

Rgds

Dagmara

4 Replies
manisha_uit
Creator
Creator

Please post sample

Thanks

Manisha

Not applicable
Author

Hi,

The middle section (bold) is the SUM on Only Expression (Field) that is not working.

=(SUM (Distinct([Geld infra.GEMAAKTEKOSTEN EX TOTAAL])))- (SUM (Distinct ONLY( {<[Thermometer attribuut infra.SOORT] = {'Eindprognose'}>}[Thermometer attribuut infra.VOORJAAREEN]))) + (SUM(Distinct([Geld infra.OPENSTVERPL EX TOTAAL])))

And the problem with the extra condition on top of the field containing ONLY expression.

=IF([Cyclusinfra.LABEL] = '2012 Q1',SUM(ONLY({<[Thermometer attribuut infra.SOORT] =
{'Eindprognose'}>}[Thermometer attribuut infra.JAAREEN])))

Data set is confidential and connected to many other incompany sources so I'm unfortunately unable to post the file.

manisha_uit
Creator
Creator

Hi Dagmara,

'Only' function will return only one numeric value.

Try without using Sum(Distinct)

Thanks

Manisha

Not applicable
Author

Hi,

Thanks. I'll try it. I'm only a bit concerned whether it will give me the right results as I need the sum of all the fields, not the value of one of the fields, but I might be wrong.

Thanks!

Rgds

Dagmara