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,
I need to to get the max "as of date" from the below dataset with below conditon.
The lastest "as of date" date should be less than or equal to the selected date in the slicer and within a same deal_ID. So for each deal_ID, I will have a "MAX as of date".
Here is the sample data:
deal_id | values | as of date | Desired output |
1234 | 30 September 2022 | 31 August 2022 | |
1234 | 19000 | 31 August 2022 | 31 August 2022 |
1234 | 20000 | 31 July 2022 | 31 August 2022 |
1235 | 30 June 2022 | 31 May 2022 | |
1235 | 30000 | 31 May 2022 | 31 May 2022 |
1235 | 40000 | 30 April 2022 | 31 May 2022 |
1235 | 31 March 2022 | 31 May 2022 | |
1236 | 23000 | 28 February 2022 | 28 February 2022 |
1236 | 21000 | 31 January 2022 | 28 February 2022 |
So as per the above data -
if I select
Date Slicer: 30-Sep-2022
Deal ID Slicer: 1234
my output should be: 31 August 2022
if I select
Date Slicer: 31-May-2022
Deal ID Slicer: 1235
my output should be: 31 May 2022
So, basically I need to have first non blank max date "as of date" is less than or equal to the slicer date within a same deal id.
Thanks,
RC
Solved! Go to Solution.
Hi @ramchoudhary ,
Probably you need this calculated column:
Desired output = MAXX(FILTER('Table',[deal_id]=EARLIER('Table'[deal_id])&&[values]<>BLANK()),[as of date])
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ramchoudhary ,
Probably you need this calculated column:
Desired output = MAXX(FILTER('Table',[deal_id]=EARLIER('Table'[deal_id])&&[values]<>BLANK()),[as of date])
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Try the measure
Proud to be a Super User! | |
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 |
---|---|
114 | |
99 | |
82 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |