Forum Discussion
find max value based on another filtered column
Hi
I am trying to create a column that retreive the MAX "WeekStart" column based DayCount = 7 in the table below. I found a post in 2020 with a solution that requires a 20 lines of DAX code, is there a simpler way?
Solved: Re: Extract a Single Value from a Column with Dupl... - Microsoft Fabric Community
6 Replies
- danextian
Super User
Hi powerlight1
If those colums in your screenshot are all physical columns, you can simply use:
CALCULATE ( MAX ( 'table'[weekStart] ), allecxept ( 'table', 'table'[DayCount] ) )Otherwise, please expound and provide a workable sample data (not an image), your expected result from the same sample data and your reasoning behind. You may post a link to Excel or a sanitized copy of your PBIX stored in the cloud.
- ThxAlot
Super User
= CALCULATE( MAX( Data[weekStart] ), Data[DayCount] = 7 ) - mickey64
Super User
For your reference.
Step 0: I use these DATA below.
Step 1: I make a measure and a Card visual below.
M_MaxDate = MAXX(FILTER('DATA','DATA'[DayCount]=7),'DATA'[WeekSrtart])
- Ahmedx
Super User
- v-lgarikapat
Community Support
Hi powerlight1 ,
Thanks for reaching out to the Fabric Community forum.
Ahmedx , mickey64 , ThxAlot , danextian thank you for your prompt responses.
powerlight1 following up to confirm whether the earlier replies addressed your query. If not, please share any additional questions and we’ll be glad to assist further.
Thanks,
Lakshmi.
- v-lgarikapat
Community Support
Hi powerlight1 ,
following up to confirm whether the earlier replies addressed your query. If not, please share any additional questions and we’ll be glad to assist further.
Thanks,
Lakshmi.