Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello,
I have a data set with people and days worked:
Person date What I need
A 01/01/2022 1
A 02/01/2022 2
B 02/01/2022 1
A 03/01/2022 3
B 04/01/2022 1
So is like each time is not the next day he should back to 1 so i can keep the record about the max days worked in a row.
I am open to solutions in M or DAX
Thanks in advacnce
Solved! Go to Solution.
Hi, @juancosta2911
Please try calculated columns as below:
Index = RANKX(filter('Table 1','Table 1'[Person]=EARLIER('Table 1'[Person])),'Table 1'[Date],,ASC,Dense)
Group = 'Table 1'[Date]-'Table 1'[Index]
New Index = RANKX(filter('Table 1','Table 1'[Person]=EARLIER('Table 1'[Person])&&'Table 1'[Group]=EARLIER('Table 1'[Group])),'Table 1'[Index],,ASC,Dense)
Best Regards,
Community Support Team _ Eason
Hi, @juancosta2911
Please try calculated columns as below:
Index = RANKX(filter('Table 1','Table 1'[Person]=EARLIER('Table 1'[Person])),'Table 1'[Date],,ASC,Dense)
Group = 'Table 1'[Date]-'Table 1'[Index]
New Index = RANKX(filter('Table 1','Table 1'[Person]=EARLIER('Table 1'[Person])&&'Table 1'[Group]=EARLIER('Table 1'[Group])),'Table 1'[Index],,ASC,Dense)
Best Regards,
Community Support Team _ Eason
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
74 | |
63 | |
51 | |
47 |
User | Count |
---|---|
211 | |
85 | |
64 | |
59 | |
56 |