Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

How to label based on few selected columns and date from a date range(Month)



I want to label the CustomerSKID according to the Manufacturer's Name and Purchase Date. Below I have shared a picture of my table. How can I label the CustomerSKID as L or A. The Purchase smaller date should be considered as 'PreviousPurchaseDate', and the max date should be considered as 'RecentPurchaseDate'. And all the CustomerSKID which have 'RecentPurchaseDate' as 03/2021 (March 2021). So if the PreviousPurchaseDate is given as 18-10-2017 with manufacturername as JD and for RecentPurchaseDate is given as 07-11-2017 with another ManufacturerName then the CustomerSKID will be labelled as A.


Screenshot (908).png


How to achieve this?

Super User III
Super User III

Hi @moulshree172 ,


Not really understanding how your dates/manufacturer is influencing the final result.


You refer to supplier JD however in terms of dates you refer the March 2021 but your data only has values for 2017.


Do you want to select all the purchases for the first supplier (in this case JD) has L and the rest has A? Is the supplier dynamic based on the first purchase or is always the same ?



Miguel Félix

Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português

Helpful resources

PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors