Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, could you please help me solve a problem with using a year variable in set analysis :
Firstly, I have set the year variable with following statement -
LET vYear_Current = Year(Today());
When I use this expression, I get the correct answer -
=COUNT({<'StartYear' = {'2014'}>} [EMP NO.])
When I use this, I get zero as the answer -
=COUNT({<'StartYear' = {$vYear_Current}>} [EMP NO.])
Thanks,
Wayne
Try some thing like this
=COUNT({<'StartYear' = {'$(=vYear_Current)'}>} [EMP NO.])
Try some thing like this
=COUNT({<'StartYear' = {'$(=vYear_Current)'}>} [EMP NO.])
try,
=COUNT({<'StartYear' = {$(=vYear_Current)}>} [EMP NO.])
hope this helps.
regards,
MT
Try like
=COUNT({<'StartYear' = {'$( vYear_Current )' }>} [EMP NO.])
Hi,
Try like this
=COUNT({<[StartYear] = {$(=vYear_Current)}>} [EMP NO.])
Regards,
Jagan.
Use this Expression.
=COUNT({<'StartYear' = {"$( vYear_Current )" }>} [EMP NO.])
And also check whether the variable passed is giving you correct value by removing the name of the expression and then hover on Expression in chart.
Thank you all so much for replying, really appreciate it.
5 slightly different answers, no wonder I am finding the syntax in set analysis a little challenging. Just for the record, three gave me the answer I was looking for :
=COUNT({<'StartYear' = {'$(=vYear_Current)'}>} [EMP NO.])
=COUNT({<'StartYear' = {$(=vYear_Current)}>} [EMP NO.])
=COUNT({<[StartYear] = {$(=vYear_Current)}>} [EMP NO.])
=COUNT({<'StartYear' = {$vYear_Current}>} [EMP NO.]) - my initial attempt.
It seems the = sign preceding the variable is the key.
Thanks again
Wayne