Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi dear Community,
I want to show Sum of Sales, if Sales are made by group nr. 5 or a multiple of group nr. 5, live 15, 25 or 45.
My expression should look like this:
if( GroupNr. = 5 or a multiple of 5, Sum(Sales))
maybe it is close to: if( GroupNr. = 5 or Group Nr. 5*x , Sum(Sales))
So if Group Nr. 10, 15 and 65 made sales, those should get summed up.
Is there any set analysis or function for my problem?
Thank you very much
Jakob
Hi Jakob
Please see if the below would work?
IF(MOD(GroupNr, 5) = 0, SUM(Sales))
Regards
Rajiv.
If GroupNr is a dimension in your chart, then you can use Rajivs solution.
If GroupNr is not a dimension, then you can try with:
=Sum(IF (Mod(GroupNr, 5)=0, Sales)) // Slow
or
=Sum({<GroupNr*={$(=Concat(DISTINCT IF(Mod(GroupNr, 5)=0, GroupNr), ','))}>} Sales) // Fast
another possible expression:
Sum({$<GroupNr={"=not Mod(GroupNr,5)"}>} Sales)
hope this helps
regards
Marco
Hi Rajiv, Peter and Marco,
thank you very much for your help, with your hints I was able so solve my problem.
Have a nice day,
Jakob
Hi,
glad it helped.
Can you please post your solution?
thanks
regards
Marco