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 am trying to determine the first user to touch an account and to exclude any automate touches. For example, below is my data. For account 1, the first user should be Bob and for account 2, the first user should be Jim. I am dealing with millions of rows so anyway to do this in a measure? Thanks!
Account | User | Activity | Index |
1 | Ann | Sell | 1 |
1 | Bob | Buy | 2 |
1 | Automate | Sell | 3 |
2 | Cally | Sell | 4 |
2 | Sam | Buy | 5 |
2 | Jim | Sell | 6 |
Solved! Go to Solution.
@PowerBI123456 , Try a new measure like
measure = calculate(sum(Table[Index]), filter(Table,Table[Index] = calculate(max(Table[Index]), allexpcept(Table,table[Account]), table[Activity] <> "Automate")))
@amitchandak Looking at the index. First user who has the greatest index per account and that user cannot be "automate". Does that help?
@PowerBI123456 , Try a new measure like
measure = calculate(sum(Table[Index]), filter(Table,Table[Index] = calculate(max(Table[Index]), allexpcept(Table,table[Account]), table[Activity] <> "Automate")))