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: 
Not applicable

How to subtract previous Datum Belegte Plätze ?

Hallo ,

ich mache momentan ein Praktikum und arbeite seit kurzem mit Qlikview(und habe noch recht wenig Ahnung) und habe folgendes Problem.

Ich möchte gerne, dass mir die Differenz der Belegten Plätzen von den jeweiligen Materialien angezeigt wird, wie hier im Bild.

Hier im Bild habe ich zum beispiel ( Hier ist es nach MATERIAL geordnet )

Die Dimension ist hier:

Datum und Material

Formel:

Belegte Plätze ( Sum(Material1111) )

DIfferenz: = Sum(Material1111) - (Rangesum(above(sum(Material1111)))))

Variablen habe ich KEINE

den 22.10 und das Material 156314  das 1268 Belegte Plätze hat

das selbe Material hat am nächsten Tag 1266 belegte Plätze , also eine Differenz von -2 Plätze.

Hier klappt es,

Nach Material Sortiert.jpg

Wenn ich die selbe Tabelle nach DATUM ordne, sieht es wie folgt aus.

Hier ist es so eingestellt wie oben...

Die Dimension ist hier (wie oben)

Datum und Material

Formel:

Belegte Plätze ( Sum(Material1111) )

DIfferenz: = Sum(Material1111) - (Rangesum(above(sum(Material1111)))))

Variablen habe ich KEINE

Nach Datum Sortiert.jpg

Das Problem ist hier:

Das er mir die DIfferenz berechnet, aber nicht von dem SELBEN Material:

Ich würde es gerne so haben:

DatumMaterial
Belegte PlätzeDifferenz
22.1015631412681268
22.10514346579579
23.101563141266-2
23.10514346601+22
............

und nicht, dass er willkürlich von JEDEM Material, die DIfferenz abzieht.

Ich wäre über jede Hilfe dankbar.

Gruß

Benny

in Englisch with google translate

hello,

I'm currently an intern and work now with Qlikview (and still have very little idea) and have the following problem.

I would like that to me the difference of occupied spaces is indicated by the respective materials, as shown in the picture.

In this picture I have for example (here it is after MATERIAL ordered)

The Dimension is here:

Datum und Material

Formel:

Belegte Plätze ( Sum(Material1111) )

DIfferenz: = Sum(Material1111) - (Rangesum(above(sum(Material1111)))))

I have NO variables

the 22/10 and the material has 156314 the 1268 Occupied spaces

the same material has the next day occupied seats in 1266, ie a difference of -2 places.

Here it works,

Nach Material Sortiert.jpg

If I assign the same table after DATE, it looks like this.

Here it is set as above ...

The dimension is here (as above)

Date and material

formula:

Filled squares (Sum (Material1111))

Difference: = Sum (Material1111) - (Rangesum (above (sum (Material1111)))))

I have NO variables

Nach Datum Sortiert.jpg

The problem is here:

He calculated the difference to me, but not of the SAME material:

I would like to have it so:

DatumMaterial
Belegte PlätzeDifferenz
22.1015631412681268
22.10514346579579
23.101563141266-2
23.10514346601+22
............

and not that he arbitrarily deducted from EACH material difference.

I would be grateful for any help.

greeting

Benny

1 Solution

Accepted Solutions
MarcoWedel

Hallo Benny,

one solution might be to calculate the difference at script level and not in the front end. This way the result won't be sorting dependent:

QlikCommunity_Thread_140634_Pic1.JPG.jpg

tabBelegtPlaetz:

LOAD Datum,

    Material,

    [Belegte Plätze],

    If(Material=Previous(Material),[Belegte Plätze]-Previous([Belegte Plätze])) as Differenz

Resident tabTestdata

Order By Material, Datum;

hope this helps

regards

Marco

P.S.: Schön, dass Du Deine Frage auch auf englisch gepostet hast, so können alle Forenteilnehmer mitlesen. Wenn Du ausschließlich auf deutsch posten möchtest, ist dieses Forum evtl. für Dich interessant:

German User Group - Deutsche User Group

Viel Spaß beim Praktikum

View solution in original post

2 Replies
MarcoWedel

Hallo Benny,

one solution might be to calculate the difference at script level and not in the front end. This way the result won't be sorting dependent:

QlikCommunity_Thread_140634_Pic1.JPG.jpg

tabBelegtPlaetz:

LOAD Datum,

    Material,

    [Belegte Plätze],

    If(Material=Previous(Material),[Belegte Plätze]-Previous([Belegte Plätze])) as Differenz

Resident tabTestdata

Order By Material, Datum;

hope this helps

regards

Marco

P.S.: Schön, dass Du Deine Frage auch auf englisch gepostet hast, so können alle Forenteilnehmer mitlesen. Wenn Du ausschließlich auf deutsch posten möchtest, ist dieses Forum evtl. für Dich interessant:

German User Group - Deutsche User Group

Viel Spaß beim Praktikum

MarcoWedel

Hi Benny,

please close this thread if your question is answered.

thanks

regards

Marco