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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
azeemkhalipha
Regular Visitor

DAX error

1.JPG2.JPG3.JPG

 

 

 

I have used DAX code to use UNICHAR for showing Loss in financial data, but I am getting the above error. Please help (Note- I am using financial data by Power BI desktop)

 

 

@needhelp 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@azeemkhalipha , As I suggested above, I created it as a measure and that seems to be working. Please find the file attached after signature.

View solution in original post

6 REPLIES 6
amitchandak
Super User
Super User

@azeemkhalipha , As I suggested above, I created it as a measure and that seems to be working. Please find the file attached after signature.

amitchandak
Super User
Super User

@azeemkhalipha ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

The "Enterprise" row is showing twice when I add the DAX function. I want it to be in one row only with "red" remark

PhilipTreacy
Super User
Super User

Hi @azeemkhalipha 

Download sample PBIX with this code and visual

As a Measure use this

 

Remark = 

VAR _Red = UNICHAR(128308)
VAR _Green = UNICHAR(128994)

RETURN
IF(MAX('Financials'[Profit]) <= 0 , _Red, _Green)

 

Capture.PNG

 

 

 

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.