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
Hi pbi community,
I am struggeling with a problem : I need to count the LiaisonKey on the table 'Demande'.
In this main table, all the liaisonkeys are distinctvalues.
In the rad table, some liaisonkeys appear more than once.
I need to count all the liaisonkey in Demande excluding all the liaisonkey in Rad IF :
- earliest DateRadiation for each liaisonkey is > 01-05-2021 AND
- DtDerad for that same liaisonkey and Dateradiation is blank
I tried a simple measure :
but it doesn't work. I tried a calculated column in Demande table with lookupvalues, but didn't work neither.
Any ideas?
here's a sample of my dataset : https://www.transfernow.net/dl/20211014cnFR4oG1/dJ6BZELN
Solved! Go to Solution.
Hi, @AFra
According to your description, You can create a measure.
Like this:
Measure2 =
VAR eardate =
CALCULATE (
MIN ( Rad[DateRadiation] ),
FILTER ( ALL ( Rad ), [LiaisonKey] = SELECTEDVALUE ( Rad[LiaisonKey] ) )
)
RETURN
CALCULATE (
DISTINCT ( Demande[LIAISONKEY] ),
FILTER ( ALL ( Rad ), [DtDerad] <> BLANK () && eardate <= DATE ( 2021, 1, 5 ) )
)
Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.
Best Regards,
Community Support Team _ Janey
Hi, @AFra
According to your description, You can create a measure.
Like this:
Measure2 =
VAR eardate =
CALCULATE (
MIN ( Rad[DateRadiation] ),
FILTER ( ALL ( Rad ), [LiaisonKey] = SELECTEDVALUE ( Rad[LiaisonKey] ) )
)
RETURN
CALCULATE (
DISTINCT ( Demande[LIAISONKEY] ),
FILTER ( ALL ( Rad ), [DtDerad] <> BLANK () && eardate <= DATE ( 2021, 1, 5 ) )
)
Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.
Best Regards,
Community Support Team _ Janey
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 |
|---|---|
| 103 | |
| 80 | |
| 64 | |
| 50 | |
| 45 |