Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
jakobjosef
Creator II
Creator II

Multiple of a value

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

5 Replies
rajivmeher
Creator
Creator

Hi Jakob

Please see if the below would work?

IF(MOD(GroupNr, 5) = 0, SUM(Sales))


Regards

Rajiv.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

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

MarcoWedel

another possible expression:

Sum({$<GroupNr={"=not Mod(GroupNr,5)"}>} Sales)

hope this helps

regards

Marco

jakobjosef
Creator II
Creator II
Author

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

MarcoWedel

Hi,

glad it helped.

Can you please post your solution?

thanks

regards

Marco