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.
Hi,
I'd like to get some help on an efficient DAX solution for calculating the most recent value (text) per group.
As the below picture shows, I have the customers' visiting history by date by location. I am looking for a solution to show the most recent visited store's information per customer.
Since the store column is a text datatype, I am not able to utilize the MIN/ MAX function so well around that.
Looking forward to any creative comments! Thank you in advance!!
Solved! Go to Solution.
Hi @jts_ ,
Try to create a measure like so:
Latest Store =
MAXX (
TOPN (
1,
ALLEXCEPT ( 'Table', 'Table'[Customer] ),
CALCULATE ( MAX ( 'Table'[Date] ) ), DESC
),
[Store]
)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
You may refer to my solution in this file.
Hope this helps.
Hi @VahidDM ,
Thanks for your response. Sure thing- Please see below for the text version of the data. Text in red are the result that I wanted to get. Thank you!
Date Customer Store
1/1/2022 Amy A
3/1/2022 Amy A
5/1/2022 Amy C
-------------------------------------
2/1/2022 Brenda D
3/1/2022 Brenda A
-------------------------------------
4/1/2022 Carmela B
5/1/2022 Carmela A
6/1/2022 Carmela B
Hi,
You may refer to my solution in this file.
Hope this helps.
Hi @jts_ ,
Try to create a measure like so:
Latest Store =
MAXX (
TOPN (
1,
ALLEXCEPT ( 'Table', 'Table'[Customer] ),
CALCULATE ( MAX ( 'Table'[Date] ) ), DESC
),
[Store]
)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
---|---|
107 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |