Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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
Contributor

Re: Sum on a field containing ONLY? 2x ONLY?

Please post sample

Thanks

Manisha

Not applicable

Re: Sum on a field containing ONLY? 2x ONLY?

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
Contributor

Re: Sum on a field containing ONLY? 2x ONLY?

Hi Dagmara,

'Only' function will return only one numeric value.

Try without using Sum(Distinct)

Thanks

Manisha

Not applicable

Re: Sum on a field containing ONLY? 2x ONLY?

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