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

View all the Fabric Data Days sessions on demand. View schedule

Reply
NISH72
Helper IV
Helper IV

Flag data if it existed in last 6 months?

Hi I have customer id in my dataset. I want to flag customer id which have appeared in report in last 6 months. I want to create calculated column for it. Any dax for these to flag the IDs. Thanks
1 ACCEPTED SOLUTION
ibarrau
Super User
Super User

Hi. The first thing you need to validate is that the tables are related. I will asume you have a fact table and a customer dimension ( one to many ).

 

You can create a calculated column like this:

VAR last_date = MAXX ( RELATEDTABLE(FactTable) , FactTable[Date] )

RETURN 
IF ( 
    last_date >= EDATE( today(), -6 ) ,
    "Yes" ,
    "No" ,
)

Try it and let me know if i can help, hope this helps

 

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


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

Happy to help!

LaDataWeb Blog

View solution in original post

1 REPLY 1
ibarrau
Super User
Super User

Hi. The first thing you need to validate is that the tables are related. I will asume you have a fact table and a customer dimension ( one to many ).

 

You can create a calculated column like this:

VAR last_date = MAXX ( RELATEDTABLE(FactTable) , FactTable[Date] )

RETURN 
IF ( 
    last_date >= EDATE( today(), -6 ) ,
    "Yes" ,
    "No" ,
)

Try it and let me know if i can help, hope this helps

 

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


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

Happy to help!

LaDataWeb Blog

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors