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: 
thewillemzelluf
Creator
Creator

penalty for double transaction

Guys,


I have a question about Qliksense. I would like to do the following. In our company, people buy items through an auction. Every time someone buys something, transaction costs are added and this is what I want to monitor. I want to be able to see who is doing double or triple transactions with the same product on the same day.


I have already thought about this by looking at the article number and the purchase date. Every purchase is a row in the purchase table with a purchase date. (see appendix) and actually I want (through a flag or something) to give a penalty for every double purchase on the same date. Someone who knows how to do this?
Thanks in advance!


voorbeeld vraag.png


Gr, Willem

4 Replies
OmarBenSalem

Imagine u have this:

t0:

load *   Inline  [

Nb, Date

1, 15/01/2017

1, 15/01/2017

1, 16/01/2017

1, 17/01/2017

2, 11/01/2017

2, 05/02/2017

3, 01/02/2018

3, 06/05/2018

3, 06/05/2018

];

NoConcatenate

Table:

LOAD *,

  If(Nb = Previous(Nb),

  If(Date = Previous(Date),1)) as Flag

Resident t0

Order By Nb, Date;

Drop Table t0;

Result:

Capture.PNG

Quy_Nguyen
Specialist
Specialist

Hi,

If you want to do it on dashboard, try creating a table with:

+ Dimension: Article Number, Date

+ Measure: Count( Article Number)  for times of purchasing.

If times of purchasing is larger than 1, that row data is duplicated.

If you want to mark it as a flag, you have to do it in Script load with group by and join function.

thewillemzelluf
Creator
Creator
Author

Thankyou this is the solution!

OmarBenSalem

Good to know !

Please once your question answered, don't forget close the thread by marking the correct response as CORRECT.