Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hola,
Me podeis ayudar en una formula para una columna que devolva una fecha (mating Date) para egual primary ID y service >1
Algo como "return (mating date , if primary identidy are the same && service >1)
Espero haber podido explicar
Muchas gracias!
Envio tabla de ejemplo.
| PrimaryIdentity | FarmNumber | DateOfBirth | EntryDate | SoldDate | Farrowings | Cycle | Service | X | MatingDate | ||
| 3947 | 752 | 04/04/2017 | 04/12/2017 | 20/05/2021 | 8 | 9 | 1 | 1 | 04/01/2021 | 04/01/2021 | |
| 3950 | 752 | 04/04/2017 | 04/12/2017 | 10/06/2021 | 8 | 9 | 1 | 1 | 25/01/2021 | 25/01/2021 | |
| 3995 | 752 | 07/04/2017 | 11/09/2017 | 27/05/2021 | 7 | 8 | 1 | 1 | 06/01/2021 | 06/01/2021 | |
| 4008 | 752 | 27/04/2017 | 09/10/2017 | 17/06/2021 | 7 | 8 | 1 | 1 | 25/01/2021 | 25/01/2021 | |
| 4020 | 752 | 27/04/2017 | 09/10/2017 | 10/06/2021 | 7 | 8 | 1 | 1 | 18/01/2021 | 18/01/2021 | |
| 4025 | 752 | 27/04/2017 | 09/10/2017 | 10/06/2021 | 7 | 8 | 1 | 1 | 21/01/2021 | 21/01/2021 | |
| 4039 | 752 | 06/07/2017 | 11/12/2017 | 10/06/2021 | 7 | 8 | 1 | 1 | 25/01/2021 | 25/01/2021 | |
| 4040 | 752 | 06/07/2017 | 11/12/2017 | 18/11/2021 | 7 | 8 | 1 | 1 | 02/02/2021 | 02/02/2021 | |
| 4042 | 752 | 06/07/2017 | 11/12/2017 | 08/07/2021 | 7 | 8 | 1 | 1 | 25/01/2021 | 25/01/2021 | |
| 4042 | 752 | 06/07/2017 | 11/12/2017 | 08/07/2021 | 7 | 8 | 2 | 1 | 20/02/2021 | -> | 25/01/2021 |
| 4053 | 752 | 06/07/2017 | 11/12/2017 | 22/02/2021 | 6 | 7 | 1 | 1 | 22/01/2021 | 22/01/2021 | |
| 4054 | 752 | 06/07/2017 | 11/12/2017 | 10/06/2021 | 6 | 7 | 1 | 1 | 15/01/2021 | 15/01/2021 | |
| 4054 | 752 | 06/07/2017 | 11/12/2017 | 10/06/2021 | 6 | 7 | 2 | 1 | 07/02/2021 | -> | 15/01/2021 |
| 4059 | 752 | 06/07/2017 | 11/12/2017 | 01/07/2021 | 6 | 7 | 1 | 1 | 08/02/2021 | 08/02/2021 | |
| 4065 | 752 | 06/07/2017 | 11/12/2017 | 22/07/2021 | 6 | 7 | 1 | 1 | 01/03/2021 | 01/03/2021 | |
| 41749 | 34 | 02/07/2017 | 29/11/2017 | 08/08/2022 | 10 | 11 | 1 | 3 | 10/03/2022 | 10/03/2022 | |
| 41854 | 34 | 03/07/2017 | 06/12/2017 | 26/07/2022 | 10 | 11 | 1 | 2 | 09/03/2022 | 09/03/2022 | |
| 041731@1 | 34 | 02/07/2017 | 29/11/2017 | 29/03/2022 | 10 | 11 | 1 | 3 | 09/03/2022 | 09/03/2022 |
Solved! Go to Solution.
Hi @DBrito79 ,
I have created a simple sample , please refer to my pbix file to see if it helps you.
Create 2 measures.
Measure = var _1=CALCULATE(COUNT('Table'[PrimaryIdentity]),FILTER(ALL('Table'),'Table'[PrimaryIdentity]=SELECTEDVALUE('Table'[PrimaryIdentity])))
return
IF(_1>1&&MAX('Table'[Service])>1,BLANK(),MAX('Table'[MatingDate]))
Measure 2 = MAXX(FILTER(ALL('Table'),'Table'[PrimaryIdentity]=SELECTEDVALUE('Table'[PrimaryIdentity])),[Measure])
Or 2 columns.
Column = var _1=CALCULATE(COUNT('Table'[PrimaryIdentity]),FILTER('Table','Table'[PrimaryIdentity]=EARLIER('Table'[PrimaryIdentity])))
var _2=IF(_1>1&&'Table'[Service]>1,BLANK(),'Table'[MatingDate])
return _2Column 2 = MAXX(FILTER('Table','Table'[PrimaryIdentity]=EARLIER('Table'[PrimaryIdentity])),'Table'[Column])
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello!
Yes it works and helps a lot! And also helps for another similar formula that I need after.
Thank you very much. You are a genius!
Best Regards
Diogo
Hi @DBrito79 ,
I have created a simple sample , please refer to my pbix file to see if it helps you.
Create 2 measures.
Measure = var _1=CALCULATE(COUNT('Table'[PrimaryIdentity]),FILTER(ALL('Table'),'Table'[PrimaryIdentity]=SELECTEDVALUE('Table'[PrimaryIdentity])))
return
IF(_1>1&&MAX('Table'[Service])>1,BLANK(),MAX('Table'[MatingDate]))
Measure 2 = MAXX(FILTER(ALL('Table'),'Table'[PrimaryIdentity]=SELECTEDVALUE('Table'[PrimaryIdentity])),[Measure])
Or 2 columns.
Column = var _1=CALCULATE(COUNT('Table'[PrimaryIdentity]),FILTER('Table','Table'[PrimaryIdentity]=EARLIER('Table'[PrimaryIdentity])))
var _2=IF(_1>1&&'Table'[Service]>1,BLANK(),'Table'[MatingDate])
return _2Column 2 = MAXX(FILTER('Table','Table'[PrimaryIdentity]=EARLIER('Table'[PrimaryIdentity])),'Table'[Column])
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 9 | |
| 8 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 23 | |
| 18 | |
| 16 | |
| 15 | |
| 14 |