Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Chitemerere
Responsive Resident
Responsive Resident

Maximum Value of of Measure

I have a measure called "Total Applications" which I have ploted on a line chart against "Year" from a calendar as follows:

MaximumValue.png

 

How can I get the maximum total applications for the date range on the plot?

 

Thanking you in advance

7 REPLIES 7
v-xinruzhu-msft
Community Support
Community Support

Hi @Chitemerere 

You can refer to the following example:

calculate(Maxx(all(table),[Total Applications]),DATESBETWEEN(CALENDAR[Date],yourstartdate,yourenddate))

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

grandtotal
Resolver III
Resolver III

@Chitemerere , you need to set and use a Date table for this solution.

The logic for the measure is something like this:

 

Highest Total Applications = 
VAR minDate = MIN(dimDate[Date])
VAR maxDate = MAX(dimDate[Date])
VAR result =
    CALCULATE(
        MAX('Table'[Value]),
        'Table'[Date] >= minDate && 'Table'[Date] <= maxDate
    )
RETURN
result

 

Thank you very much for your response.  I am confused, which table and value are referred to above in 'Table' and 'Value'

Thank you very much.  I am confused, wich table 'Table' and value 'Value' are referred here?

It's a general solution, you have change the table and value to your own datamodel.

We can help but you need to share the details of your model/measures.

Chitemerere
Responsive Resident
Responsive Resident

Managed to solve it with the following DAX:

Highest Total Applications = MAXX(SUMMARIZE(ALL(NewApplications),NewAppCalendar[Year]), [Total Applications]).  Is it possible to have a DAX measure which gives the "Year" for this "Highest Total Applications"??

For the date of highest total application (MaxDate) you can try this:

 

MaxDate = 
VAR maxvalue = 'Table'[Highest Total Applications]
VAR result =
    CALCULATE(
        VALUES(dimDate[Date]),
        FILTER(
            'Table',
            'Table'[Value] = maxvalue
        )
    )
RETURN
result

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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