- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
GetFieldSelections-Function - calculate the previous month
Hey Guys,
I have a problem with the GetFieldSelections-Function. I would like the Month before the Selection (previous month)
That is my expression:
=Sum({<Monat={"$(=GetFieldSelections(Monat)-1)"}>}Plan)
The calculation of the currently selected month works
Could you help me?
Thank you very much!
- Tags:
- qlikview_deployment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you selecting a single month value? How did you create month field in the script, using month()?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, a single month is always chosen.
Only there does the calculation need to work
... and i use Month()
Month(Datumsfeld) AS Monat,
SET MonthNames='Jan;Feb;Mrz;Apr;Mai;Jun;Jul;Aug;Sep;Okt;Nov;Dez';
---
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try formatting the dual to string for set comparison like:
=Sum({<Monat={"$(=Month(Date#(GetFieldSelections(Monat)-1,'M')))"}>}Plan)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try formatting the dual to string for set comparison like:
=Sum({<Monat={"$(=Month(Date#(GetFieldSelections(Monat)-1,'M')))"}>}Plan)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
...the part of the formula "-1" does not work for me. I think there is the problem. But I have no solution
=Sum({<Monat={"$(=Month(Date#(GetFieldSelections(Monat)-1,'MMM')))"}>}Plan)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you post a sample qvw?