Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
We have users from two different regions. One would like to see number as 700.100.50,00 and other would like to see 700,100,50.00.
So thousand separator could be different from user to user. As you see in attached IMAGE, we have Separator in Number tab of chart properties.
We would like when user view via access point using AD credentials, It shows them number format in either way as I explained above.
Can we use some function to get user windows settings or if we can do some magic to change property value of thousand / decimal separator. Thanks for your help in advance
As far as I know you will have to explicitly use the Num()-function on every expression to override the settings.
If you have an expression like this:
Sum( Sales )
You will have to write:
Num( Sum( Sales ) ,'#,##0.0' , '.' , ',' )
The third and the fourth parameter specify the decimal and thousand separator. They could of course be substituted by variables that map to the particular user and which region that user belong to.
So this would be a way of doing it:
SET vNumDecimal = =GetRegistryString('HKEY_CURRENT_USER\Control Panel\International' , 'sDecimal' );
SET vNumThousand = =GetRegistryString('HKEY_CURRENT_USER\Control Panel\International' , 'sThousand' );
SET vNumFormat = ='#' & vNumThousand & '##0' & vNumDecimal & '00';
Num( Sum( Sales ) , '$(vNumFormat)', '$(vNumDec)' , '$(vNumThousand)' )
Not entirely sure if this would work in your case but there is a function called OSUser(), perhaps you could create 2 separate charts, one with the separators as commas and one with decimals and conditionally show them conditionally based on what OSUser is accessing the dashboard?
Another possible option would be to check region - this way if users are moved across regions or added to regions there would be less maintenance. Also you could try to use Expression default at the chart level and format your expression based on the region (or OSuser)
As far as I know you will have to explicitly use the Num()-function on every expression to override the settings.
If you have an expression like this:
Sum( Sales )
You will have to write:
Num( Sum( Sales ) ,'#,##0.0' , '.' , ',' )
The third and the fourth parameter specify the decimal and thousand separator. They could of course be substituted by variables that map to the particular user and which region that user belong to.
So this would be a way of doing it:
SET vNumDecimal = =GetRegistryString('HKEY_CURRENT_USER\Control Panel\International' , 'sDecimal' );
SET vNumThousand = =GetRegistryString('HKEY_CURRENT_USER\Control Panel\International' , 'sThousand' );
SET vNumFormat = ='#' & vNumThousand & '##0' & vNumDecimal & '00';
Num( Sum( Sales ) , '$(vNumFormat)', '$(vNumDec)' , '$(vNumThousand)' )
Thank you for your reply...
We are not only talking about few users. It would be nice to have some sort of function to get user settings from windows and then I could put those in variable and use variable there.
Thanks I will try this.