Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
bmac1
Partner - Contributor II
Partner - Contributor II

Problem with Total in Calculation

Hi I have an expression in the front-end which compares two expressions.

 

If the rangemax() of these two expressions is equal to 0, we show 1 in the new column.

Else we take the rangemax() of the two expressions and show the greater value.

--

If(
RangeMax($(expA),$(expB))=0,'1',
RangeMax($(expA),$(expB))

--

What we are seeing is that in the total of this expression, the '1' isn't being counted into the total for the rows where the first condition is met.

Any ideas?

 

 

Labels (1)
2 Replies
Digvijay_Singh

Pl share the complete expression, do you have anything before If( statement.

Do you really need if condition here? isn't it same as RangeMax($(expA),$(expB),1)?

If both expA and expB are <=0, the final value will be automatically '1' in above expression  Ishared as '1' is higher than rest of the two.

Let me know if I am missing something or misunderstood the need here.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

On the total line, the expression is being run over all the data, so your result makes sense. If you want to add the 1's (which are really zero values) from the previous lines, for this expression change the Totals Mode from "Auto" to "Sum".

-Rob