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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I have a data set in which I have a series of invioces with various criteria. But i'm trying to account for an issue in which multiple invoices are created for the same account. This would only occur if another criteria is met, in this case a flag is indicated...so I can't use Group By in Power Query
Can I create column in the table that would identify if that same accountID has another row with an earlier invoice date?
Solved! Go to Solution.
Hi @paguy215 ,
I create a table as you mentioned.
Then I create a new calculated column.
Column =
VAR _minDate =
CALCULATE (
MIN ( 'Table'[Date] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[accountID] = EARLIER ( 'Table'[accountID] )
)
)
VAR _maxDate =
MAXX (
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[accountID] = EARLIER ( 'Table'[accountID] )
),
'Table'[Date]
)
RETURN
IF ( 'Table'[Date] = _minDate && 'Table'[Date] <> _maxDate, 1 )
Finally you will get the date you want.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @paguy215 ,
I create a table as you mentioned.
Then I create a new calculated column.
Column =
VAR _minDate =
CALCULATE (
MIN ( 'Table'[Date] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[accountID] = EARLIER ( 'Table'[accountID] )
)
)
VAR _maxDate =
MAXX (
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[accountID] = EARLIER ( 'Table'[accountID] )
),
'Table'[Date]
)
RETURN
IF ( 'Table'[Date] = _minDate && 'Table'[Date] <> _maxDate, 1 )
Finally you will get the date you want.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...