Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Rajveer
Contributor II
Contributor II

Need to know the meaning of these two Statement

SET vSize = Div(Log10(fAbs($1)),3);

and 


SET vAmountFormat = Dual(Num($1/Pow(10,3*$(vSize($1))),'###0.00;(###0.00)')&Pick($(vSize($1)),'K','M','B'),$1);

 

Labels (1)
2 Replies
vincent_ardiet_
Specialist
Specialist

Apparently you have a variable vSize which should be something like
RangeMax(RangeMin(1,Div(Log10($1),3)),3)
Or something else but which is returning a number between 1 and 3, 1 if the parameter ($1) is under 1 million, 2 if under 1 billion, 3 above.
Then the formula you are showing is dividing the number given in parameter by 1,000 or 1,000,000 or 1,000,000,00 based on what vSize is returning and adding 'K', 'M' or 'B' after this number.

boazbo
Contributor
Contributor

Let's assume that the first statement is true. In this case, the statement agrees with itself, so it is indeed true. Now, let's assume that the statement is false. In this case, the statement is incorrect, so it is indeed false. As such, the statement can be considered both true and false, depending on how you approach it.