Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
Contributor III

Custom Fuction Issue

Here My scenario is Create Custom Fuction to show values in Crores,Lacs,Thousands etc for that purpose

I Have Been Created One Variable in Script Level i.e

SET FormatNumber=Dual(

    if($1>=10000000,num($1/10000000,'₹ ##.##Cr'),

if($1>=100000,num($1/100000,'₹ ##.##L'),

if($1>=1000,num($1/1000,'₹ ##.##K'),

$1))) ,$1);

I Have Been Created One Variable in Frontend i.e  vCondition this variable contains expression like below

if(Measures='Clients Traded (Unique)',$(vUniqueClientsTraded),
if(Measures='Volume (Cr)',$(vTotalVolume),
if(Measures='Brokerage in Lacs (Gross)',$(vBrokerage),
if(Measures='No. of Trading Days',$(vNoftradingdays),
if(Measures='Avg. brokerage per client',$(vAvgClientBrokerage),
if(Measures='Avg. daily login',$(vAvgDailyLogins),
if(Measures='Avg. daily brokerage',$(vAvgDailyBrokerage),
if(Measures='Avg. daily volume',$(vAvgDailyVolume)

here I am passing vCondition as a parameter to FormatNumber like below


But I unable to get the expected result .

Hello Qlik Experts,

Please provide me the correct solution to overcome the above problem.

Tags (1)
1 Reply
MVP & Luminary
MVP & Luminary

Re: Custom Fuction Issue

Hi Ranjit,

I'd suggest two improvements:

1. Start the formula in vCondition with the equal sign, in order to pick the relevant formula before the expression gets to the Chart Measure - that means that Measures cannot be your chart Dimension, but it will largely improve performance.

2. The parameter to the $-sign expansion needs to be enclosed in single quotes, to appear as a string:


I believe that these two changes should fix the problem, however everything needs to be tested :-)

We teach these advanced techniques at the Masters Summit for Qlik - check our upcoming schedule and see if our agenda is good for you.


Oleg Troyansky

Upgrade your Qlik Skills with my book QlikView Your Business: An Expert Guide to Business Discovery with QlikView and Qlik Sense

Community Browser