Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
I have a table with 12 columns. Two of those colums are week ending date and cost . I want to return the cost corresponding to latest week ending date. Can someone help me with the formula?
Solved! Go to Solution.
That helped. However I had to tweak it a little.
CALCULATE(FIRSTNONBLANK(Data[To Date MH/UN],1=1),FILTER(Data,Data[Week ending date]=MAX(Data[Week ending date])))
When I tried to use your code, I was not able to select the required field. For some reason, it was not acceting the field [To Date MH/UN]. I had to use FirstNoBlank and use 1=1 in the expression part of the function.
Thank you for your help!
Please try below coding to see if this can meet your requirement. Thanks.
Measure = CALCULATE(SELECTEDVALUE(Sheet2[cost]),FILTER(Sheet2,Sheet2[week]=MAX(Sheet2[week])))
Proud to be a Super User!
That helped. However I had to tweak it a little.
CALCULATE(FIRSTNONBLANK(Data[To Date MH/UN],1=1),FILTER(Data,Data[Week ending date]=MAX(Data[Week ending date])))
When I tried to use your code, I was not able to select the required field. For some reason, it was not acceting the field [To Date MH/UN]. I had to use FirstNoBlank and use 1=1 in the expression part of the function.
Thank you for your help!
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
87 | |
87 | |
83 | |
65 | |
49 |
User | Count |
---|---|
127 | |
108 | |
89 | |
70 | |
66 |