The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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...
User | Count |
---|---|
13 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
24 | |
14 | |
13 | |
8 | |
8 |