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 want to find the max of the "Sold" column based on the max "ReadingDate" for each product category extracted to a new column called "MaxSold" . Please, I would like to use DAX for this. For example, Beans would extracted as 9 as the max based on the date time field. Thanks so much.
ReadingDate | Prroduct | Sold |
7/1/2020 : 7:37:44 PM | Beans | 1 |
7/1/2020 : 7:45:29 AM | Beans | 0 |
7/3/2020 : 7:37:44 PM | Rice | 0 |
7/1/2020 : 5:37:44 AM | Fruit | 3 |
7/16/2020 : 7:37:44 AM | Rice | 0 |
7/5/2020 : 10:00:44 AM | Yam | 4 |
7/16/2020 : 04:37:44 PM | Yam | 5 |
7/8/2020 : 11:37:14 PM | Fruit | 3 |
7/1/2020 : 5:37:13 AM | Yam | 1 |
7/15/2020 : 7:37:44 PM | Fruit | 0 |
7/4/2020 : 2:02:12 PM | Beans | 1 |
7/5/2020 : 7:37:44 AM | Beans | 0 |
7/5/2020 : 7:37:44 PM | Rice | 2 |
7/10/2020 : 5:27:09 PM | Beans | 9 |
7/16/2020 : 7:37:44 PM | Rice | 0 |
7/16/2020 : 6:20:11AM | Rice | 3 |
7/17/2020 : 7:37:44 PM | Rice | 4 |
7/16/2020 : 12:37:44 PM | Fruit | 8 |
7/16/2020 : 9:37:40 AM | Fruit | 9 |
Solved! Go to Solution.
@Anonymous , Try
lastnonblankvalue(Table[Date],max(Table([Sold])))
or
lastnonblankvalue(Table[Date],sum(Table([Sold])))
Refer this blog : https://www.linkedin.com/pulse/five-recent-power-bi-functions-you-should-use-more-often-amit-chandak
@Anonymous , Try
lastnonblankvalue(Table[Date],max(Table([Sold])))
or
lastnonblankvalue(Table[Date],sum(Table([Sold])))
Refer this blog : https://www.linkedin.com/pulse/five-recent-power-bi-functions-you-should-use-more-often-amit-chandak
THANK YOU SO MUCH, it worked like a charm 😁.
@Anonymous - Seems like you want Lookup Min/Max - https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/m-p/985814#M434
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 |
---|---|
111 | |
94 | |
83 | |
66 | |
59 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |