cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper III

## MIN and MAX Dates (and Scores) in Calculated Table

I have a bunch of rows that contain Assessment Dates and Scores.

I want to create a calculated table that pulls the MIN Date and score, and MAX Date and score for each client.

I created a caclulated table that gets the MIN and MAX Dates, but not sure how to pull the associated scores in too.

Here's the table calc bringing in the dates:

Table =
SUMMARIZE (
"Start Date", MIN ( GAD_PHQ[Assess_Date] ),
"End Date", MAX ( GAD_PHQ[Assess_Date] )
1 ACCEPTED SOLUTION
Community Champion

``````Table =
SUMMARIZECOLUMNS(
),
"Start Score",
CALCULATE(
GAD_PHQ[Assess_Date] = EARLIER( [Start Date] )
),
"End Score",
CALCULATE(
GAD_PHQ[Assess_Date] = EARLIER( [End Date] )
)
)``````

 Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! DAX is simple, but NOT EASY!
3 REPLIES 3
Community Champion

``````Table =
SUMMARIZECOLUMNS(
),
"Start Score",
CALCULATE(
GAD_PHQ[Assess_Date] = EARLIER( [Start Date] )
),
"End Score",
CALCULATE(
GAD_PHQ[Assess_Date] = EARLIER( [End Date] )
)
)``````

 Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! DAX is simple, but NOT EASY!
Helper III

Is there a way to add an additional filter so the results show Start Date and Score, End Date and Score, per Client ID AND Assessment Type? Right now, it's pulling Start and End per Client ID only.

Super User

Hi @pbrainard ,

```CalculatedTable =
SUMMARIZE (
"Start Date", MIN ( 'GAD_PHQ'[Assess_Date] ),
"End Date",   MAX ( 'GAD_PHQ'[Assess_Date] ),
)```

Does this work for you? 🙂

 Also happily accepting Kudos 🙂

 Feel free to connect with me on LinkedIn!

 #proudtobeasuperuser

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

#### Fabric Community Update - August 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors