Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hi DAX team,
I am having filtering concept that's scratching.
i want to show null or blank if the same [key] is used with reference to the [Payment Date] that is blank, currently it's showing the date '02/02/2022' but if payment date is part of the same key then dont show the date in the [payment date (final)] column. but the requirement also requires showing the max date if same key in [payment date (final)] column does not contain any blanks.
I tried to use the below dax query which does find the max date but i cant filter out if its blank.
Any help is much appreciated. thanks!!
Solved! Go to Solution.
Hi @deng2431 ,
Please try:
Payment date(Final) =
VAR _a =
CALCULATE (
MAX ( 'Table'[Payment Date] ),
FILTER ( 'Table', [Key] = EARLIER ( 'Table'[Key] ) )
)
VAR _b =
SELECTCOLUMNS (
FILTER ( 'Table', [Key] = EARLIER ( 'Table'[Key] ) ),
"Payment Date", [Payment Date]
)
RETURN
IF ( BLANK () IN _b, BLANK (), _a )
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @deng2431 ,
Please try:
Payment date(Final) =
VAR _a =
CALCULATE (
MAX ( 'Table'[Payment Date] ),
FILTER ( 'Table', [Key] = EARLIER ( 'Table'[Key] ) )
)
VAR _b =
SELECTCOLUMNS (
FILTER ( 'Table', [Key] = EARLIER ( 'Table'[Key] ) ),
"Payment Date", [Payment Date]
)
RETURN
IF ( BLANK () IN _b, BLANK (), _a )
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @appsac1
I'm not sure that I totally understand the requirements.
Is this what you are looking for? (calculated column)
Hi @djurecicK2 ,
No, the opposite. if Payment date is blank and same/recurring [Key] exists with another Payment date then dont show anything in the [Payment date (Final)]. but do show the max date if there are no blank payment date for same/recurring [Key].
@deng2431 So, if Payment date is blank, you want Payment date (Final) to be the Max Payment date with the same Key. Is that right?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 13 | |
| 9 | |
| 8 | |
| 8 | |
| 7 |