Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!See when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap
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
User | Count |
---|---|
87 | |
74 | |
69 | |
58 | |
55 |
User | Count |
---|---|
41 | |
38 | |
34 | |
32 | |
30 |