Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi There
I am trying to add a column to a set of data which would identify the earliest entry based on a date field.
I have an excel spreadsheet with data that contains duplicate entries from the same customer which all have a field for when they were registered and I want to highlight the line which is the earliest entry and mark it with a column of True/False or somthing similar.
Example:
Customer | Date Registered | Earliest Record |
A | 6/30/2016 | FALSE |
A | 5/30/2016 | FALSE |
A | 1/30/2016 | TRUE |
B | 2/3/2017 | TRUE |
B | 8/8/2017 | FALSE |
A | 5/28/2016 | FALSE |
In Excel I would use the MINISF function with some aditional columns to work it out but how would I acomplish this in Power BI?
Thanks
Paul
Solved! Go to Solution.
Create a new column:
Earliest Record = IF( TableName[Date Registered] = CALCULATE( MIN(TableName[Date Registered]), ALLEXCEPT(TableName, TableName[Customer]) ), TRUE, FALSE )
Proud to be a Super User!
Hi,
Try this
=CALCULATE(MIN([Date Registered]),FILTER(data,data[Customer]=EARLIER(data[Customer])))
Hope this helps.
Create a new column:
Earliest Record = IF( TableName[Date Registered] = CALCULATE( MIN(TableName[Date Registered]), ALLEXCEPT(TableName, TableName[Customer]) ), TRUE, FALSE )
Proud to be a Super User!
Worked perfectly, thanks!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |