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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Sold/Not Sold/New Sold in DAX (A third parameter based on a date and UNICHAR function)

Hi.
I have created a measure that shows which products we have sold or not sold to a customer:

Sold/Not Sold =
IF(SUM('Table1'[Sales Quantity])>0,"SOLD",UNICHAR(128310))

First: I just discovered UNICHAR. And I can only find a UNICHAR code for a red diamond shape (128310), does anyone know about a code that shows a green icon, so I dont need to put in "SOLD"? In my matrix it looks like this now:
NorthernKarsten_0-1619696413295.png

 

Second:
I need some help with the Sold/Not Sold measure to add an extra criteria. Ideally I want to have it like this:
Sold = Some kind of a geen icon (Worst case it can return "SOLD")
Not Sold = Some kind of a red icon (Already have this sorted in a way...)
New Sold = This should tell me that if a product is never sold before, but is sold from or after 29.04.2021 it will be a yellow icon (in worst case it can return "NEW SOLD").
For example: If "Yam" (in the matrix) is sold 29 april 2021 it should return a yellow icon/"NEW SOLD" when I filter the report on april 2021.
If I filter the report on march 2021 it should return the red icon, because its Not sold in that particular period that I have chosen. 

Appriciate any help!
3 REPLIES 3
Anonymous
Not applicable

@amitchandak do you have any idéa for how I can write this measure?

Greg_Deckler
Super User
Super User

@Anonymous - Well, you could use conditional formatting along with a UNICHAR character to get the different colors - Unichar Green circle light - Microsoft Power BI Community

 

Also, 9989 is a green check mark box. Here is the full UNICODE characters list: Basic Latin — ✔️ ❤️ ★ Unicode Character Table (unicode-table.com)

 

For New Sold you could do a FILTER on the table for dates previous to that day and if the COUNTROWS of that filtered table ISBLANK then it would be new sold.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler OK, thanks!

Could you please show me an example of how this can look like in this measure?:

Sold/Not Sold/New Sold =
IF(SUM('Table1'[Sales Quantity])>0,UNICHAR(9989),UNICHAR(10060))

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.