
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ignoring day selection from date field
I hope someone can help with this. I am trying to create a set expression to ignore only the day selection out of a date variable. The intention is that the user will select a particular date using the date picker which will then in the KPIs show data for that date, but that a line graph on the same sheet of the dashboard will continue to show the trend in data for the month and year that was selected over all days in the month.
I have tried creating a variable that contains the month that was selected and ignoring the Date field, but that then just results in the metric ignoring all the entirety of date: sum({<[Date.autoCalendar.Month]=${'vMonth'}, Date>} Metric)
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you look closely, your set analysis condition is not even getting used here
Try this
Sum({<[Date.autoCalendar.Month]={'$(=$(vMonth))'}, Date>} Metric)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you looking to do this?
Sum({<[Date.autoCalendar.Month] = {"$(vMonth)"}, Date>} Metric)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sunny
Thanks for the quick response, if I use the expression you suggested I get a 0 . . .

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The original expression was working in a sense it gave you a number?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi - yes it does, the problem is that the answer is then provided for all months even when vMonth is only equal to the month that was selected via the date picker. I have created an example of what happens in the attached using some dummy data

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you look closely, your set analysis condition is not even getting used here
Try this
Sum({<[Date.autoCalendar.Month]={'$(=$(vMonth))'}, Date>} Metric)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sunny
If I use the suggestion you just gave to a different user re set analysis with variable, it works!
{"$(=$(vteste))"}
So thanks for solving my problem in an indirect way 🙂
This works: sum({<[Date.autoCalendar.Month]={"$(=$(vMonth))"}, Date>} Metric)
