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.
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!
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 |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
144 | |
109 | |
108 | |
88 | |
61 |