Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi, folks,
First of all, this forum is amazing.
I want to create the "Max Date by Value" column, which includes the largest date for each ID group that has the value of 2.
Here is what I want such a table to look like.
ID | Date | Value | Max Date by Value |
1 | 11/1/2015 | 4 | 5/1/2013 |
1 | 5/1/2014 | 5 | 5/1/2013 |
1 | 5/1/2013 | 2 | 5/1/2013 |
2 | 11/1/2012 | 1 | Null |
3 | 1/1/2013 | 2 | 1/1/2016 |
3 | 6/1/2010 | 5 | 1/1/2016 |
3 | 11/1/2016 | 4 | 1/1/2016 |
3 | 1/1/2016 | 2 | 1/1/2016 |
3 | 7/1/2017 | 7 | 1/1/2016 |
Here is the code I am playing with that is not working:
Solved! Go to Solution.
Try
Column
Max Date by Value = if([Value]=2, blank(),maxx(filter('Table', [ID]=earlier([ID])),[Date]))
Measure
Max Date by Value = calculate(max(Date),ALLEXCEPT('Table', 'Table'[ID]),[Value]<>2)
Max Date by Value = if(max([Value]=2),blank(),calculate(max(Date),ALLEXCEPT('Table', 'Table'[ID])))
Try
Column
Max Date by Value = if([Value]=2, blank(),maxx(filter('Table', [ID]=earlier([ID])),[Date]))
Measure
Max Date by Value = calculate(max(Date),ALLEXCEPT('Table', 'Table'[ID]),[Value]<>2)
Max Date by Value = if(max([Value]=2),blank(),calculate(max(Date),ALLEXCEPT('Table', 'Table'[ID])))
I think I just figured it out.
User | Count |
---|---|
96 | |
87 | |
78 | |
73 | |
69 |
User | Count |
---|---|
113 | |
105 | |
84 | |
65 | |
64 |