Reputation: 35
I have tried to fix the out of present range problem in Power Bi Dax formula
General background
I have a data-set as below, the dashboard allows the user to select the preferred currency and then the table update the value. For example, if click on the US, then the table sum all Sales in Jan from the US
as well as showing $ or € accordingly
The DAX function I have tried is
CONCATENATE( Table[Country]="US", "$",FORMAT(sum(Table[Sales]),"0")
but it comes up with below error
Couldn't load the data for this visual
The following system error occurred: Out of present range
Any help, please. thanks
Upvotes: 0
Views: 1211
Reputation: 40244
You don't need to use any concatenation. You can simply put the currency symbol in the FORMAT
function. For example:
Measure = SWITCH(SELECTEDVALUE(Table[Country]),
"EUR", FORMAT(SUM(Table[Sales]), "€0.00"),
"US", FORMAT(SUM(Table[Sales]), "$0.00"),
"UK", FORMAT(SUM(Table[Sales]), "£0.00"))
Upvotes: 0