Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I want to impalement pick wildmatch with 2 conditions
like following :
Pick(Match(Time_Period,'YTD','MAT','Relative Qtr','3M Roll Avg','Cal Year','Cal Month','Cal Qtr') and
GetFieldSelections(Measures) = 'Sales $'
Thanks in adv.
Vikas
Your question is missing some detail in order for me/us to help you with the specifics, nut I'll try to give you a more generic answer.
You want to create an expression combining the two functions pick and wildmatch where these functions are constructed using the formats listed below.
pick (n, expr1[ , expr2,...exprN])
wildmatch ( str, expr1 [ , expr2,...exprN ])
In a pick (wildmatch()) setup you want to replace the n of the pick() with the output of the wildmatch() like this.
pick ( wildmatch ( str, expr1 [ , expr2,...exprN ]) , expr1[ , expr2,...exprN])
Let use it in an example classifying the content of the fiels [Word] as a-words, b-words and c-words.
pick(wildmatch ([Word], 'a*','c*','b*'), 'A-word','C-Word','B-Word'))
I hope this was helpful for you. If you need help with the specifics of your application then please provide more input on what you are trying to do and what output you get from your current attempts.
- Vegar
Sorry for that,
I need to optimize my following expressions I created island filter pane when user will select Sales$ measure &
Time_period accordingly I need to the values if user select YTD & MAT & sales $ measure it should give 2 values YTD & MAT in pivot table.
GetFieldSelections(Measures) = 'Sales $'
and
Pick(Match(Time_Period,'YTD','MAT','Relative Qtr','3M Roll Avg','Cal Year','Cal Month','Cal Qtr'),
//'SalesYTD'
Sum({<New_Flag_YTD = {1} , MonthNumber = { $(=$(vMaxMonth) ) }> }Sales_Dollars),
//'Sales MAT'
Sum( {< Flag_Rolling12Months = {1} , MonthNumber = { $(=$(vMaxMonth) ) } > } Sales_Dollars),
//'Relative Qtr'
Sum({<Flag_Rolling3Months = {1},CALENDAR_Month_3MRolling = {'$(=$(v_CALENDAR_Month_3MRolling) )'}>} Sales_Dollars),
//'3M Roll Avg'
sum({<CalMonthYear=,MonthName,Flag_Rolling3Months = {1},CalMonthYear={">=$(v_MonthStart) <=$(=max(MonthYear))"}>} Sales_Dollars)/3,
//'Cal Year'
Sum( {<Flag_YTD = {1} > }Sales_Dollars),
//'Cal Month'
Sum( {< Flag_MTD = {1} > }Sales_Dollars),
//'Cal Qtr'
Sum( {< Flag_QTD = {1} > }Sales_Dollars)
)
I don't think you can get two expressions to display from one measure.
What about creating a dynamic report with one measure per time dimension. Then you can control which expression that is displayed in your pivot using show/hide conditions on the measures of the pivot table.