Change expression format to non decimal number

Posted 6 months ago by Jaroslaw Wojciech Gniazdowski

Post a topic
Answered
J
Jaroslaw Wojciech Gniazdowski

Hi All,

I'm trying to change % from decimal to non decimal expression, I've tried to use Num/Format functions but to no avail, example below. I'd like to see 5% and 2% instead 5.4% and 2.1%.
The expression I'm using:

"KPI 1 " & [Datasource].[QLIK_APP].[Expression].[=num(

    (
    num(MAKEDATE(vD_InputYear, vD_InputMonth, if(isnull(vD_InputDay),day(Today()),vD_InputDay)))
    -
    num(MAKEDATE(vD_InputYear, (vD_InputQuarter*3-2),1))
    +1)

/

    (
    num(MonthEnd(MAKEDATE(vD_InputYear, (vD_InputQuarter*3),1)))
    -
    num(MAKEDATE(vD_InputYear, (vD_InputQuarter*3-2),1))
    )
,'#,##0') * 100] & "%" 


0 Votes

Emma Camacho

Emma Camacho posted 6 months ago Admin Best Answer

Hi Jaroslaw,


Please enclose the num expression with the text function, something like this:

"KPI 1" & [Datasource].[your_datasource].[Expression].[ text( num( ... ) * 100 ) ] & "%"

With the text function you force M&D to use the text representation of the number, as M&D will always try to display the numeric version of the number.


Let me know if this helps for you,


regards, Emma

0 Votes


1 Comments

Emma Camacho

Emma Camacho posted 6 months ago Admin Answer

Hi Jaroslaw,


Please enclose the num expression with the text function, something like this:

"KPI 1" & [Datasource].[your_datasource].[Expression].[ text( num( ... ) * 100 ) ] & "%"

With the text function you force M&D to use the text representation of the number, as M&D will always try to display the numeric version of the number.


Let me know if this helps for you,


regards, Emma

0 Votes

Login or Sign up to post a comment