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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
KOCHA
New Member

measure a label

Hello,

I'm a relatively new user of Power BI. I want to create a measure. For example, all the clients enrolled in the last month (registration date is already a field in my database) are marked as "NEW". How can I do that?

Thanks for your advice.

KOCHA

5 REPLIES 5
marcelsmaglhaes
Super User
Super User

Hi @KOCHA 

 

If you want label a new customer, is better create a New Column in the customers table. If you wanna do that using DAX, you can try the measure bellow.

If this post helps, please mark as solved. 

Regards,
Marcel

new_customer=
VAR __current_month = MONTH(TODAY())
VAR __current_year = YEAR(TODAY())
RETURN
IF(
           YEAR(YOUT_TABLE[REGISTRATION_DATE]) = __current_year &&
          ( MONTH(YOUT_TABLE[REGISTRATION_DATE]) = __current_month ||
              MONTH(YOUT_TABLE[REGISTRATION_DATE]) = __current_month-1)  
, "NEW CUSTOMER",
            "old customer")

Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI

If I've helped, don't forget to mark my post as a solution!



Unfortunately, it doesn't work. The visual doesn't display when I added this new measure.

 

mlsx4
Memorable Member
Memorable Member

Hi @KOCHA 

 

Do you have a column with "new" as values or do you need a column to create it?
Also, can you share how is your data structured? You can put A, B, C 1234 to keep confidentiality

I can't create it because the dashboard is directly on another database source. Let me check if there is a workaround. Thanks.

 

You created a calculated column? Tutorial: Create calculated columns in Power BI Desktop - Power BI | Microsoft Learn


Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI

If I've helped, don't forget to mark my post as a solution!



Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.