Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
gfisch13
Creator II
Creator II

Even Dollar Amounts

Good morning folks - I'm working with a file of purchase orders and want to identify only those that have even amounts, for instance, $10,000, $50,000, $1,250,000, $6,000,000.   I've searched these boards but have yet to hit on what I'm looking for.   Is there an easy way to do this.  In other applications I've seen this called Round Amounts or Flat Dollar Amounts.  Just not sure what to call it here.  

Appreciate the guidance.  Thanks!

George

Labels (3)
16 Replies
gfisch13
Creator II
Creator II
Author

Thank you Vidyut - this will help me putting these values into buckets for further filtering.  Appreciate the input.

edwin
Master II
Master II

@vidyut thats an interesting view which didnt come to mind however, it will count zeroes no matter where it is:
100000111

vidyut
Partner - Creator II
Partner - Creator II

@edwin  yes, you are correct. I was just stressing the point that in case you want to extract more features, start looking at the number as string, that may give you some interesting options.

In this case, to count the trailing zeros, if the whole dollar amount  is available in field txtNum, an expression of the form len(txtNum)-[hidden function call on txtNum] would return the number of trailing zeros. 

Can you guess what is this function? I could give the solution, but thought it would be a fun exercise. 🙂

 

 

edwin
Master II
Master II

@vidyut interested in your mystery function.  could that find magnitude of the number (K,M,B,...)?  could be a new thread

vidyut
Partner - Creator II
Partner - Creator II

@edwin 

ok, I give you the answer, If you use len(txtNum) - findOneOf(txtNum,`123456789`,-1), You should get the exact number of Trailing Zeros , which was the feature we were after.

@gfisch13 , Try incorporating this one, and let me know your interesting finds 🙂

Cheers

edwin
Master II
Master II

lets not talk about decimal places rt?  : )

vidyut
Partner - Creator II
Partner - Creator II

Depends on how you have the data stored. You have a valid point though 😊