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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Bonjour j'ai une table avec 2 colonnes, la première avec des dates de prestations et la deuxième avec des personnes.
Les dates de prestations ne se suivent pas. je souhaiterais obtenir le nombre de jours entre la date de la ligne et la date inférieure existante par personne.
Ex dans le fichier joint, Pour obtenir la colonne Diff Last date à partir de date et Nom
| Date | Nom | Diff last date |
| 01/07/2019 | A | null |
| 02/07/2019 | A | 1 |
| 05/07/2019 | A | 3 |
| 01/07/2019 | B | null |
| 03/07/2019 | B | 2 |
Merci
Solved! Go to Solution.
Hi @Anonymous ,
Try this code for a custom column:
Bonsoir @Anonymous
Diff last date =
DATEDIFF (
CALCULATE (
MAX ( Table1[Date] ),
ALLEXCEPT ( Table1, Table1[Nom] ),
Table1[Date] < EARLIER ( Table1[Date] )
),
Table1[Date],
DAY
)
Please mark the question solved when done and consider giving kudos if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Bonsoir @Anonymous
Diff last date =
DATEDIFF (
CALCULATE (
MAX ( Table1[Date] ),
ALLEXCEPT ( Table1, Table1[Nom] ),
Table1[Date] < EARLIER ( Table1[Date] )
),
Table1[Date],
DAY
)
Please mark the question solved when done and consider giving kudos if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 14 | |
| 14 | |
| 12 | |
| 7 | |
| 6 |