Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all
I have the expression below and the answer I get is -1 and 0. I have a list of medals won by date and I want only the ones in 2015. Can you please help? And what is wrong with the below expression?
=year([Medal.Win Date])=2015
Perhaps this expression does what you want: only({<[Medal.Win Date]={"=Year([Medal.Win Date])=2015"}>}[Medal.Win Date])
May be this:
Dimension: Date
Expression: Count({<Year = {2015}>}[Medal.Win Date])
This should give you the count of medals on all dates.
HTH
Best,
Sunny
Your expression is a test. It tests if the result of year([Medal.Win Date]) is 2015. That test is either true (-1) or false (0). That's why you get -1 and 0 values.
Hi Sunny,
Thanks for the suggestion, this works but I am looking for the column to show the year '2015' and for that column to show only 2015 data.
Thanks
Perhaps this expression does what you want: only({<[Medal.Win Date]={"=Year([Medal.Win Date])=2015"}>}[Medal.Win Date])
Use expression Label as '2015'
Hi Sunny,
Thanks for the response. I dont actually want to change the Column title but to have the column contents show the year 2015 in the cells rather than 1 etc.
I have this sorted thanks to the above expression. Thanks again for your help.