- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Peter_Price,
Obviously, you are wrong with CONCATENATE function, it not support there merge values which you wired.
Reference links:
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
If this post helps, please consider accept as solution to help other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Peter_Price,
Obviously, you are wrong with CONCATENATE function, it not support there merge values which you wired.
Reference links:
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
If this post helps, please consider accept as solution to help other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
it works perfectly, thx XiaoXin
Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Microsoft Fabric Community Conference 2025
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
Subject | Author | Posted | |
---|---|---|---|
08-04-2024 10:36 PM | |||
07-31-2024 11:01 AM | |||
05-24-2024 07:29 AM | |||
11-28-2023 06:41 AM | |||
12-19-2023 08:03 AM |
User | Count |
---|---|
120 | |
73 | |
58 | |
57 | |
43 |
User | Count |
---|---|
180 | |
119 | |
82 | |
68 | |
54 |