Skip to main content
cancel
Showing results for 
Search instead 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

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
Europe Fabric Conference

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.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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