Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello:
I have a straight table with 2016 and 2017 data. I'd like to limit the data to just data from 2017. The field I'm trying to use is Approved_YearMonth which is in the format of YYYYMM, i.e. 201701, 201702, etc.
In the straight table, I've entered =Date(MonthStart(Approved_YearMonth), 'YYYYMM') as a dimension with the label of Approved_YearMonth.
As always, thanks in advance for any and all help.
Try like:
= IF(WildMatch(Approved_YearMonth, '2017*') > 0, Approved_YearMonth)
OR
= IF(Left(Approved_YearMonth, 4) = '2017', Approved_YearMonth)
Try like:
= IF(WildMatch(Approved_YearMonth, '2017*') > 0, Approved_YearMonth)
OR
= IF(Left(Approved_YearMonth, 4) = '2017', Approved_YearMonth)
Hello Vishwarath:
Both expressions work. Thank you very much!
Again, thank you very much for your help.
For your 2nd Question you can use something like this:
Create a variable in the Script or using Variable Overview (Ctrl+Alt+V) then add the variable.
In Script
LET vCurrentYear = Year(Today());
In Variable Overview window add
vCurrentYear
your expression should be = Year(Today()).
Then you can use that variable like
= IF(Left(Approved_YearMonth, 4) = vCurrentYear, Approved_YearMonth).
For your 1st Question, i need to look into your sample app. Can you share your application if possible?
A variable. Good idea. Then I never have to change it or worry about the year. Thanks for the pointer.
In regards to my first question, I'm not going to worry about it at the moment. I don't think it's a big deal and I can't share my App unfortunately. Company rules.
I'll mark your first response as Correct and your last response as helpful. Thank you again.
No problem. Glad it worked for you.