Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Number formatting not working

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.

10 Replies
rubenmarin

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?