This content has been marked as final.
Show 4 replies

1. Re: How to calculate a sum with condition
Tushar More Nov 26, 2018 3:26 AM (in response to Laurène Ruban)
Registrant cnt.twbx 4.4 KB


2. Re: How to calculate a sum with condition
Zhouyi Zhang Nov 26, 2018 3:27 AM (in response to Laurène Ruban)Hi, Laurene
Please find my solution attached.
Below is the sample output for your reference.
Hope this helps
ZZ

Book1_v10.2.twbx 8.5 KB


3. Re: How to calculate a sum with condition
Amar Wattamwar Nov 26, 2018 3:30 AM (in response to Laurène Ruban)1 of 1 people found this helpfulBased on the table above, I tried to achieve the result you wanted. I have attached the screen snip of how I have achieved it.
My underlying logic to get the total amount for sector 1 as 205 instead of 410, is to use this calculated field (Sector Amount) in the viz
IF SUM([Number of Records]) = COUNTD([Total amount]) THEN SUM([Total amount])
ELSE SUM([Total amount])/COUNTD([Total amount])
END
Hope this helps.

4. Re: How to calculate a sum with condition
Laurène Ruban Nov 26, 2018 3:57 AM (in response to Laurène Ruban)Hi Tushar, Zhouyi, Amar,
Thanks a lot for all your quick and useful answers It helped a lot !
Have a nice day,
Laurène