Forum Discussion
Conditional Batch index in DAX
- vissvess6 years ago
Helper V
Here is what I needed and fullfilled for preview data in power query. But when the same is applied for loading, it simply fails for some 3M row dataset.
In summary, my data will have Date, Time, Unit Status, Physical Line & TLC against primary key job.
What I need is, a conditional batch index.
1. Data to be sorted by Date & then by time within date.2. Say, the index should start with 1 for every one day, unit status & Physical Line.
3. The index should be the same as earlier row, if the current and earlier row has same TLC. Else, increase it by 1.
For the above requirement, I did sorting(1), grouping for (2) and used List.accumulate(3). I am not the best M query expert.
DAX or Power query solution with better performance is requested.
Anonymous Anonymous