Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I am using a calculated field that needs to change based on toggle between total and average.
I am trying to get the format dynamically for totals in million and average in thousands. The formatting is not working.
Please find below the code i am using.
- Aggregate is the toggle between total and average using a variable extension
- i use the year code is to select the max date always.
//Code
if(Only({$<Year={$(=Max(Year))}>}Aggregate)=1,
num((Sum({$<Year={$(=Max(Year)}>}Contribution)/1000000),'#.##0,##M'),
if(Only({$<Year={$(=Max(Year)}>}Aggregate)=2,
num((Sum({$<Year={$(=Max(Year))}>}Contribution)/
Count({$<Year={$(=Max(YEar)}>}[ACCT])),'#,##0.00K')))
Any help would be appreciated.
Sometimes I faced that QV with selections didn't get the valuelist value, in those situations changing the if to If(RowNo()=1... ) solved the problem.
Is there a possibility to upload a sample?