Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI
this expression was working fine till last year(2016) but somehow after in new year it is not working,
basically the logic is to get user for current year till last months,
thanks
=Count (DISTINCT {<Year={'$(=max(Year))'}, Month-={"$(=month(date#(max({<Year={'$(=max(Year))'}>}Month),'MM')))"}>} [Authenticated user])
The current year until last month is... nothing.
You tell it to give you the max(Year), which I assume is now 2017. So far so good. But then your month expression, if I'm reading it right, says "but not the max month in the max year", which is to say, "but not January 2017". Well, 2017 without January 2017 is nothing. No months qualify. No data qualifies. So I'd expect the expression to return nothing.
I'm not sure what you WANT it to do instead, but I can see why it's not doing it.
If I'm reading it right, anyway.
One trick to see what it is evaluating to, is to put the expression in a straight table and don't label the expression. You can then hover over the label and it will tell you what it is evaluating to.
The current year until last month is... nothing.
You tell it to give you the max(Year), which I assume is now 2017. So far so good. But then your month expression, if I'm reading it right, says "but not the max month in the max year", which is to say, "but not January 2017". Well, 2017 without January 2017 is nothing. No months qualify. No data qualifies. So I'd expect the expression to return nothing.
I'm not sure what you WANT it to do instead, but I can see why it's not doing it.
If I'm reading it right, anyway.
ya that is true , thanks basically i have to run report every 2th of months , which is to get data for current year but till last months i dont want data for two days of current months ,so because 2017 does not has last months that why its not working i guess
So are you happy with the result you are getting? If you are, then close this thread down