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 September 15. Request your voucher.
Hi i have a set of data from different dates and for each date there is milliseconds.
what i am trying to achieve is a cumulative count until my first blank and then start again from 1
Desired result:
Diff | New Column |
21.1 | 1 |
21.2 | 2 |
21.3 | 3 |
Null | Null |
25 | 1 |
25.2 | 2 |
26 | 3 |
27 | 4 |
Solved! Go to Solution.
Hi @Anonymous
You can use this Custom Column.
See file attached as well
=let myindex=[Index] in Table.RowCount(Table.SelectRows(#"Added Custom1",each [Custom]=null and [Index]<=myindex))+1
@Anonymous
Please see attached file's Query Editor for clarity as well
Hi, thanks allot, maybe you can also help me crate this column:
Thanks again
Diff | Index | Sprint No |
21.1 | 1 | 1 |
21.2 | 2 | 1 |
21.3 | 3 | 1 |
Null | Null | Null |
18 | 1 | 2 |
18.1 | 2 | 2 |
19 | 3 | 2 |
20 | 4 | 2 |
Null | Null | Null |
|
|
|
Hi @Anonymous
You can use this Custom Column.
See file attached as well
=let myindex=[Index] in Table.RowCount(Table.SelectRows(#"Added Custom1",each [Custom]=null and [Index]<=myindex))+1
marvelous!
@Anonymous
Assuming you have an Index Column starting from 0, I believe you can use this Custom Column from Query Editor
Replace AddedIndex with the PreviousStep name in your Query Editor
let myindex=[Index] in let mytable=Table.SelectRows(AddedIndex,each [Index] < myindex and [Diff]=null) in if [Diff] <> null then if Table.IsEmpty(mytable)=false then [Index]-Table.Max(mytable,"Index")[Index] else [Index]+1 else null
User | Count |
---|---|
71 | |
64 | |
62 | |
50 | |
28 |
User | Count |
---|---|
117 | |
75 | |
61 | |
54 | |
42 |