Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Peter_Price
Frequent Visitor

How to solve Error Out of present Range in Power BI (DAX formula)

Hi Folks,

 

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,

 

Link : Image Link

 

the dashboard allows user to select the preferred currency and then the table update the value. For example , if click on US, then the table sum all Sales in Jan from 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

 

Link : Image Link

 

Any help please. thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Peter_Price,

 

Obviously, you are wrong with CONCATENATE function, it not support there merge values which you wired.

 

Reference links:

CONCATENATE Function

Joins two text strings into one text string.
CONCATENATE(<text1>, <text2>)

 

You can use below measure to achieve your requirement:

Measure =
VAR currCounty =
    SELECTEDVALUE ( Table[Country] )
VAR _symbol =
    SWITCH ( currCounty, "US", "$", "EUR", "€", "UK", "£", "$" )
RETURN
    _symbol & CALCULATE ( SUM ( Table[Sales] ), VALUES ( Table[Country] ) )

Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Peter_Price,

 

Obviously, you are wrong with CONCATENATE function, it not support there merge values which you wired.

 

Reference links:

CONCATENATE Function

Joins two text strings into one text string.
CONCATENATE(<text1>, <text2>)

 

You can use below measure to achieve your requirement:

Measure =
VAR currCounty =
    SELECTEDVALUE ( Table[Country] )
VAR _symbol =
    SWITCH ( currCounty, "US", "$", "EUR", "€", "UK", "£", "$" )
RETURN
    _symbol & CALCULATE ( SUM ( Table[Sales] ), VALUES ( Table[Country] ) )

Regards,

Xiaoxin Sheng

it works perfectly, thx XiaoXin

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.