The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
79 | |
78 | |
44 | |
37 |
User | Count |
---|---|
157 | |
113 | |
64 | |
60 | |
55 |