Forum Discussion
KOCHA
2 years agoNew 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
- marcelsmaglhaes
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,
Marcelnew_customer=VAR __current_month = MONTH(TODAY())
VAR __current_year = YEAR(TODAY())RETURNIF(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")- KOCHANew Member
Unfortunately, it doesn't work. The visual doesn't display when I added this new measure.
- marcelsmaglhaes
Super User
You created a calculated column? Tutorial: Create calculated columns in Power BI Desktop - Power BI | Microsoft Learn