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

Monatsvergleich

Hallo,

ich möchte gerne in einer Tabelle mehrere Monate nebenander darstellen. Mit der Formel für den aktuellen Monat bekomme ich auch die richtigen Werte. Nur der verflixte Vormonat will einfach nicht funktionieren.

Aktueller Monat: sum({$<Monat={$(=only(Monat))}>}Umsatz)

Vormonat: sum({$<Monat={$(=only(Monat)-1)}>}Umsatz)

Leider verzweifel ich langsam an dieser einfachen Thema, weil es so einfach nicht funktionieren will.

Kann mir irgendwer einen entscheidenen Tipp geben wo mein Denkfehler ist? Vielen Dank.

7 Replies
Not applicable
Author

Hallo

schlage ich Sie gehen Sie wie folgt vor:

Aktueller Monat: sum({$<monat={$(=only(monat))}>}Umsatz)

Vormonat: sum({$<monat={$(=only(num((monat))-1)}>}Umsatz)

Hopes dieser Arbeit. Versuchen Sie Ihre Fragen in Englisch zu senden, und dann weitere Antworten.

Not applicable
Author

Thanks, but it still doesn't work.

Not applicable
Author

Try this :

Aktueller Monat: sum({$<monat={$(=(monat))}>}Umsatz)

Vormonat: sum({$<monat={$(=(num(monat))-1)}>}Umsatz)



Please send me the format of the field "monat" Ex. YYYYMMDD

Not applicable
Author

The Field "Monat" ist just MM. I splitted the booking date into year, month and day. ex. Load Month (bookingdate) as Monat.

What I didn't anderstood is that the actual month works and -1 not!

Not applicable
Author

how is that possible? what is the format of the Actual Month?

Not applicable
Author

what do you mean with actual month?

I use the standard setting: SET DateFormat='DD.MM.YYYY';

The format of the origin date is DD.MM.YYYY

I use two listboxes to selekt the Year and the Month. And there is the format like the example before Load Month (Bookingdate) as Month.

Not applicable
Author

Hi Stefan

Comparisons in SetAnalysis can be cumbersome as it will do a 1:1 comparison. You will of course have no issue to compare Monat with Monat, but Monat-1 is a whole different thing as you create a new value.

To make things clearer use a textbox to show the representations for Monat and Monat-1. Then use the proper QV function to get the same output format for Monat-1 as for Monat.

Regards

Juerg