Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set Analysis

Hello Experts,

I am looking for some help in understanding the below set analysis expressions.

In one of our dashboard we have created variables as below.

vPriorYearDate= addyears(max([Report Date]), -1)

vLastYearMTD= > [Report Date]={"$(='>=' & MonthStart(vPriorYearDate) & '<=' & vPriorYearDate)"}, Month=, Year=,Quarter=

An in the UI we are creating a metric using the below formula

MTD $(vPreviousYear )'   = sum({$<$(vLastYearMTD)>}  [Invoice Recognized])

As far as I understood, the MTD $(vPreviousYear )' metric should not be effected by any filters on Month , Year and Quarter, but my results are getting effected by the selections made on Year, Month and Quarter. In this case my Month ,Year, Quarter are created in master calendar based on invoiceDate.

Any help would be very highly appreciated.

Thanks

Heera

4 Replies
swuehl
MVP
MVP

Your selections in Month, Year, and Quarter probably have an effect on the vPriorYearDate variable, thus also on MTD prev year variable. For previous year calculation, you need to clear the selections in calendar fields to have a consistent selection (i.e. to avoid having a Report Date selection in prev year range, but current year Year selection).

MK_QSL
MVP
MVP

vPriorYearDate= addyears(max({<Month=,Year=,Quarter=>}[Report Date]), -1)

Anonymous
Not applicable
Author

swuehl,

Thanks for the quick reply.

I am really sorry I don't think I understood you, can you please elaborate your answer..

Thanks

heera

swuehl
MVP
MVP

When you select a Month and a Year, does vPriorYearDate change as well? And is this intended (I assume it is)?

If this variable changes, vLastYearMTD will change as well.