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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Tag date start from historical data

Hi,

 

I need to be able to tag Customer IDs with respect to the month - year it started from historical data. Data is like panel data. Same customer in different points in time. 

 

Data:

IDEffective Date
1Sep-21
1Oct-21
1Nov-21
1Dec-21
1Jan-22
2Feb-20
2Mar-20
2Apr-20
2May-20
7 REPLIES 7
v-xiaotang
Community Support
Community Support

Hi @Anonymous 

Thanks for reaching out to us.

I just want to confirm if you resolved this issue? If yes, you can accept the answer helpful as the solution or share you method and accept it as solution, thanks for your contribution to improve Power BI.

If you need more help, please let me know.

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi,

 

Not yet. 

DimaMD
Solution Sage
Solution Sage

Hi @Anonymous Is this your desired outcome?Screenshot_11.jpg

Or you can use such a measure 

 

COMBINEVALUES("-",'table'[ID],'table'[Effective Date])

 


__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: embirddima@gmail.com
Anonymous
Not applicable

My desired outcome is:

 

New Column which has will be tagged as New at the start of the effective date, everything else Existing. 

@Anonymous If I understood you correctly, use the following measure.
1. Add a column with Year
2. Add a calculated column

 

test = 
VAR mindata = MINX( FILTER('table', 'table'[ID] = EARLIER([id]) && 'table'[Year] = EARLIER('table'[Year])),[Effective Date])
return
SWITCH(
     TRUE(),
     mindata = [Effective Date], "New"
     , "Existing")

 

Screenshot_12.jpg


__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: embirddima@gmail.com
Anonymous
Not applicable

Hi,

 

Thanks for the response.

 

Customer ID 1 is only new on 01.09.2022. Everything else is existing. New in a sense that as long as that customer is active, it will be tagged as existing. I just want a flag for new at the very start. If it is a new year, it will still be existing. The outcome is exactly the Test column, just a little tweak. 

@Anonymous Give an example of your desired outcome


__________________________________________

Thank you for your like and decision

__________________________________________

Greetings from Ukraine

To help me grow PayPal: embirddima@gmail.com

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.