How to display different currency based on login Id of the user?

Hi Team, I want to display the currency on the Y-axis based on the login id of the user. For Example, for User1 the report should show in Rs, whereas for another user in USD etc.

Hello Anu,

There could be various ways of implementing it like using profile attribute, user name, org name, role name etc. In below the example we are going to use users name.
A. Create the users with the name similar to currency for example: user 1 is USD, user 2 is Rupees etc.
image
B. Paste the following JS code in JS editor of report on which you want to display currency and then click on inject.

hi_container.set("preExecution",function(c){
var viz_Options = c.get("viz_Options");
var currency=DashboardGlobals.sessionUserName;
viz_Options.chartOptions["axis"] = {
y:{
tick: {
// format: d3.format(',s')
format: function (d) { return currency + " " + d; }
}
}
};
c.set("viz_Options",viz_Options);
});

image
C. Share the created report with both the user. Also share metadata and datasource.
D. Now login with the created user 1 i.e USD you can see the user name (USD ) appended to the Y-axis.
image
E. Now login with the created user 2 i.e Rupees you can see the user name (Rupees) appended to the Y-axis.
image

Thank You,
Helical Team.