Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
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...
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
17 | |
10 | |
9 | |
8 | |
7 |
User | Count |
---|---|
20 | |
11 | |
8 | |
6 | |
6 |