Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
danieloberbilli
Specialist II
Specialist II

Expression with ID reference to other field

Hi Guys,

I have the following problem:

- I would like to have the sum of Q1

- minus the value of Q1 which I find in the line (dataset-ID) where the maximum of field Reference is

Please see my example in the attached qvw. There is also some more text to explain the problem.

I tried this expression but I don´t get the right result:

sum(Q1)- FieldValue('Q1',FieldIndex('Reference',max(Reference)))

Best Regards

Daniel

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Also in english 😉

maybe like this:

=sum({<ID -= {"=rank(Reference)=1"} >} Q1)

View solution in original post

3 Replies
swuehl
MVP
MVP

Also in english 😉

maybe like this:

=sum({<ID -= {"=rank(Reference)=1"} >} Q1)

danieloberbilli
Specialist II
Specialist II
Author

Vielen Dank!!

Also das muss ich mir mal merken: Formeln in Auwahlformeln immer mit Gleichheitszeichen und doppelten Anführungszeichen...findet sich so aber auch nicht explizit im Handbuch oder Hilfe -oder?

Ich hab das anders gelöst, dachte aber auch an die rank-Funktion. Wie würdest Du die Rank-Funktion nutzen, wenn Du das Minimum ermitteln willst bei immer unterschiedlicher Anzahl von Reference?

Besten Dank!

Grüße aus Yukon

Daniel

Anonymous
Not applicable

Hi Stefan,

Could you help me with my problem? I know you have big experience with some trics in QV.

I want to create dynamic variable which get current selection.

Than I want to use this variable in condition.

Always current selection, for example = A, show green color, else gray.

=if(FieldName = My selection), rgb(139,191,31), rgb(124,124,124))

Thanks,