Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
94 | |
76 | |
62 | |
50 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |