Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
The following works well:
=sum(aggr(DISTINCT If(Sum({<[Year]={$(vCurrentYear)}>} [Hours Worked]*if(IsNull(Rate), 20, Rate))>=1000, 1, 0),[Billing code]))
where I'm effectively counting the number of Billing Codes this year that have more than £1000 worth of time recorded against them.
what I'd like to do, but can't figure out the syntax is to count the number of Billing Codes between two values.
So, instead of greater than or equal to 1000 (as above) I want to do something like >=1000 <=2000
Any help would be appreciated.
Thanks
Try this:
=sum(aggr(DISTINCT If(Sum({<[Year]={$(vCurrentYear)}>} [Hours Worked]*if(IsNull(Rate), 20, Rate))>=1000 AND Sum({<[Year]={$(vCurrentYear)}>} [Hours Worked]*if(IsNull(Rate), 20, Rate))<=2000, 1, 0),[Billing code]))
Try this:
=sum(aggr(DISTINCT If(Sum({<[Year]={$(vCurrentYear)}>} [Hours Worked]*if(IsNull(Rate), 20, Rate))>=1000 AND Sum({<[Year]={$(vCurrentYear)}>} [Hours Worked]*if(IsNull(Rate), 20, Rate))<=2000, 1, 0),[Billing code]))
Perfect, thanks