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.
Hi All,
As per the title, what I'm trying to acheive in a calculated column is find the first entry of a column value ('flowName') for a group of rows (grouped by 'uniqueId'), and populate this found value into a new column ('firstFlow')
So for example, heres a sample set of existing data with a uniqueId, dateTime and flowName.
uniqueId | dateTime | flowName | firstFlow |
1111A | 2022-03-01 10:01 | Flow Alpha | Flow Alpha |
1111A | 2022-03-01 10:02 | Flow Beta | Flow Alpha |
1111A | 2022-03-01 10:05 | Flow Gamma | Flow Alpha |
2222B | 2022-03-01 12:34 | Flow Delta | Flow Delta |
2222B | 2022-03-01 12:35 | Flow Omicron | Flow Delta |
2222B | 2022-03-01 12:56 | Flow Alpha | Flow Delta |
2222B | 2022-03-01 13:10 | Flow Omega | Flow Delta |
3333C | 2022-03-01 14:22 | Flow Gamma | Flow Gamma |
3333C | 2022-03-01 14:47 | Flow Alpha | Flow Gamma |
What I'm trying to acheive is the column result in Blue.
Thanks in advance,
Jeff.
Solved! Go to Solution.
@jeff_h , a new column
New Column =
var _max = minx(filter(Table, [uniqueId] = earlier([uniqueId]) ) ,[dateTime])
return
maxx(filter(Table, [uniqueId] = earlier([uniqueId]) && [dateTime] =_max) ,[flowName])
@amitchandak can this be used when month changes, and source is used a get from folder
@jeff_h , a new column
New Column =
var _max = minx(filter(Table, [uniqueId] = earlier([uniqueId]) ) ,[dateTime])
return
maxx(filter(Table, [uniqueId] = earlier([uniqueId]) && [dateTime] =_max) ,[flowName])
User | Count |
---|---|
11 | |
9 | |
6 | |
6 | |
5 |
User | Count |
---|---|
23 | |
14 | |
14 | |
9 | |
7 |