Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis - text object

Hello guys,

At this moment i want to have a correct € format in the red markered text object value, but i dont get the format €18.685,58.

The current expression of this text object is:

=Num(Round(sum({$<StoreCode = {'WSDP', 'WSBK', 'WSBM', 'WSMB', 'WSB1', 'WSB2'}>} SalesPrice*TransactionQuantity))
-
Sum({$<StoreCode = {'WSDP', 'WSBK', 'WSBM', 'WSMB', 'WSB1', 'WSB2'}>}GrossValue-DiscountValue))
-
Num(round(sum({$<Year={$(=Only(Year))}, Month={$(vPriorMonth)}, StoreCode={'WSDP', 'WSBK', 'WSBM', 'WSMB', 'WSB1', 'WSB2'}>}TransactionQuantity*SalesPrice))
-
sum({$<Year={$(=Only(Year))}, Month={$(vPriorMonth)}, StoreCode={'WSDP', 'WSBK', 'WSBM', 'WSMB', 'WSB1', 'WSB2'}>}GrossValue-DiscountValue),'€ #.##0,')

which expression do i have to change to get €18.685,58 ?

thanks.

4 Replies
swuehl
MVP
MVP

Try


=Num(


Round(sum({$<StoreCode = {'WSDP', 'WSBK', 'WSBM', 'WSMB', 'WSB1', 'WSB2'}>} SalesPrice*TransactionQuantity))
-
Sum({$<StoreCode = {'WSDP', 'WSBK', 'WSBM', 'WSMB', 'WSB1', 'WSB2'}>}GrossValue-DiscountValue)
-
Round(sum({$<Year={$(=Only(Year))}, Month={$(vPriorMonth)}, StoreCode={'WSDP', 'WSBK', 'WSBM', 'WSMB', 'WSB1', 'WSB2'}>}TransactionQuantity*SalesPrice))
-
sum({$<Year={$(=Only(Year))}, Month={$(vPriorMonth)}, StoreCode={'WSDP', 'WSBK', 'WSBM', 'WSMB', 'WSB1', 'WSB2'}>}GrossValue-DiscountValue)


,'€ #.##0,',',','.')

i.e. one num() function that formats the complete calculations (recheck the brackets)

Anonymous
Not applicable
Author

=Num(Round(sum({$<StoreCode = {'WSDP', 'WSBK', 'WSBM', 'WSMB', 'WSB1', 'WSB2'}>} SalesPrice*TransactionQuantity))

- Sum({$<StoreCode = {'WSDP', 'WSBK', 'WSBM', 'WSMB', 'WSB1', 'WSB2'}>}GrossValue-DiscountValue)

-

round(sum({$<Year={$(=Only(Year))}, Month={$(vPriorMonth)}, StoreCode={'WSDP', 'WSBK', 'WSBM', 'WSMB', 'WSB1', 'WSB2'}>}TransactionQuantity*SalesPrice))

- sum({$<Year={$(=Only(Year))}, Month={$(vPriorMonth)}, StoreCode={'WSDP', 'WSBK', 'WSBM', 'WSMB', 'WSB1', 'WSB2'}>}GrossValue-DiscountValue),'€ #.##0')

miguelbraga
Partner - Specialist III
Partner - Specialist III

Hi Rega,

Check this little change:

=

Num(

Num(Round(sum({$<StoreCode = {'WSDP', 'WSBK', 'WSBM', 'WSMB', 'WSB1', 'WSB2'}>} SalesPrice*TransactionQuantity))
-
Sum({$<StoreCode = {'WSDP', 'WSBK', 'WSBM', 'WSMB', 'WSB1', 'WSB2'}>}GrossValue-DiscountValue))
-
Num(round(sum({$<Year={$(=Only(Year))}, Month={$(vPriorMonth)}, StoreCode={'WSDP', 'WSBK', 'WSBM', 'WSMB', 'WSB1', 'WSB2'}>}TransactionQuantity*SalesPrice))
-
sum({$<Year={$(=Only(Year))}, Month={$(vPriorMonth)}, StoreCode={'WSDP', 'WSBK', 'WSBM', 'WSMB', 'WSB1', 'WSB2'}>}GrossValue-DiscountValue))

, '€ #.##0,00')


Regards,

MB

swuehl
MVP
MVP

Miguel is right, the format code should show the two decimals.

But your original issue is that you have used different / missing formatting functions on the aggregations, while you should do a final formatting for the result of your calculation.