Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
Should be simpler than I am thinking right?
I have a data set and I would like the average value rating shown (G,Y,R) to be the average of the current year available if no year selection is made. How can I layer in [VPP Year]={$(=Date(Today(),'YYYY'))} into the below If Statement?
=if(Avg([#of Days Post VPP])<8,'G',
if(Avg([#of Days Post VPP])<15,'Y',
if(Avg([#of Days Post VPP])>14,'R'
,'')))
Thanks!
I found a workaround 😃
Used Set Analysis to combine the current year parameter.
=if(( num(If(IsNull(GetFieldSelections([VPP Year])),
Sum({$<Gateways={'FEC'},[VPP Year]={$(=Date(Today(),'YYYY'))}>}
Aggr(Only({$<Gateways={'FEC'},[VPP Year]={$(=Date(Today(),'YYYY'))}>} [#of Days Post VPP]), Gateways, [MY Program]))/
Count({$<Gateways={'FEC'},[VPP Year]={$(=Date(Today(),'YYYY'))}>}[Gateways]),
Sum({$<Gateways={'FEC'}>}
Aggr(Only({$<Gateways={'FEC'}>} [#of Days Post VPP]), Gateways, [MY Program]))/
Count({$<Gateways={'FEC'}>}[Gateways])),'#0.0'))<8,'G',
if(( num(If(IsNull(GetFieldSelections([VPP Year])),
Sum({$<Gateways={'FEC'},[VPP Year]={$(=Date(Today(),'YYYY'))}>}
Aggr(Only({$<Gateways={'FEC'},[VPP Year]={$(=Date(Today(),'YYYY'))}>} [#of Days Post VPP]), Gateways, [MY Program]))/
Count({$<Gateways={'FEC'},[VPP Year]={$(=Date(Today(),'YYYY'))}>}[Gateways]),
Sum({$<Gateways={'FEC'}>}
Aggr(Only({$<Gateways={'FEC'}>} [#of Days Post VPP]), Gateways, [MY Program]))/
Count({$<Gateways={'FEC'}>}[Gateways])),'#0.0'))<15,'Y',
if(( num(If(IsNull(GetFieldSelections([VPP Year])),
Sum({$<Gateways={'FEC'},[VPP Year]={$(=Date(Today(),'YYYY'))}>}
Aggr(Only({$<Gateways={'FEC'},[VPP Year]={$(=Date(Today(),'YYYY'))}>} [#of Days Post VPP]), Gateways, [MY Program]))/
Count({$<Gateways={'FEC'},[VPP Year]={$(=Date(Today(),'YYYY'))}>}[Gateways]),
Sum({$<Gateways={'FEC'}>}
Aggr(Only({$<Gateways={'FEC'}>} [#of Days Post VPP]), Gateways, [MY Program]))/
Count({$<Gateways={'FEC'}>}[Gateways])),'#0.0'))>14,'R',
'')))
I found a workaround 😃
Used Set Analysis to combine the current year parameter.
=if(( num(If(IsNull(GetFieldSelections([VPP Year])),
Sum({$<Gateways={'FEC'},[VPP Year]={$(=Date(Today(),'YYYY'))}>}
Aggr(Only({$<Gateways={'FEC'},[VPP Year]={$(=Date(Today(),'YYYY'))}>} [#of Days Post VPP]), Gateways, [MY Program]))/
Count({$<Gateways={'FEC'},[VPP Year]={$(=Date(Today(),'YYYY'))}>}[Gateways]),
Sum({$<Gateways={'FEC'}>}
Aggr(Only({$<Gateways={'FEC'}>} [#of Days Post VPP]), Gateways, [MY Program]))/
Count({$<Gateways={'FEC'}>}[Gateways])),'#0.0'))<8,'G',
if(( num(If(IsNull(GetFieldSelections([VPP Year])),
Sum({$<Gateways={'FEC'},[VPP Year]={$(=Date(Today(),'YYYY'))}>}
Aggr(Only({$<Gateways={'FEC'},[VPP Year]={$(=Date(Today(),'YYYY'))}>} [#of Days Post VPP]), Gateways, [MY Program]))/
Count({$<Gateways={'FEC'},[VPP Year]={$(=Date(Today(),'YYYY'))}>}[Gateways]),
Sum({$<Gateways={'FEC'}>}
Aggr(Only({$<Gateways={'FEC'}>} [#of Days Post VPP]), Gateways, [MY Program]))/
Count({$<Gateways={'FEC'}>}[Gateways])),'#0.0'))<15,'Y',
if(( num(If(IsNull(GetFieldSelections([VPP Year])),
Sum({$<Gateways={'FEC'},[VPP Year]={$(=Date(Today(),'YYYY'))}>}
Aggr(Only({$<Gateways={'FEC'},[VPP Year]={$(=Date(Today(),'YYYY'))}>} [#of Days Post VPP]), Gateways, [MY Program]))/
Count({$<Gateways={'FEC'},[VPP Year]={$(=Date(Today(),'YYYY'))}>}[Gateways]),
Sum({$<Gateways={'FEC'}>}
Aggr(Only({$<Gateways={'FEC'}>} [#of Days Post VPP]), Gateways, [MY Program]))/
Count({$<Gateways={'FEC'}>}[Gateways])),'#0.0'))>14,'R',
'')))