I am in the process of writing an MDX expression that filters my PERIOD MONTH MAIN dimension based on two conditions. The first being where the attribute of FORECAST MONTH contains "FORECAST" and the second condition based on a wildcard search for "22" which reflects 2022 periods. I used the expression recorder and the following code (below) returned. The code works perfectly and if I update "22" to "23" then the expression returns all "2023" periods.
Code: Select all
{TM1FILTERBYPATTERN( {FILTER( {TM1SubsetBasis()}, [PERIOD MONTH MAIN].[FORECAST MONTH] = "FORECAST")}, "*22")}
Code: Select all
{FILTER( {TM1SUBSETALL( [PERIOD MONTH MAIN] )}, [PERIOD MONTH MAIN].[FORECAST MONTH] = "FORECAST")}, "*
RIGHT([GLOBAL VARIABLE].([GLOBAL VARIABLE].[Current Year],[GLOBAL VARIABLE MEASURE].[String]))), 2)"}
Michael