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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
sujaypr3
New Member

Max and min value

Hello,

 

I have created fax to find max and min value as follows:

 

MAXRev = MAXX(ALLSELECTED(Calendar, Calendar [Quarter]),[Revenue])

 

MINREev =MINX(ALLSELECTED(Calendar, Calendar [Quarter]),[Revenue])

 

It is perfectly calculating.  The problem is, if I have selected 2 years and their respective quarters say Q1 to Q4 for FY22 and Q1 to Q4 for FY23, I get max and min value for each year separately.  I want to know which is max and min across 8 quarters that is displayed in visuals

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

Try adding Calendar[Year] to the measure.

MAXRev = MAXX(ALLSELECTED(Calendar, Calendar[Year], Calendar[Quarter]), [Revenue])

View solution in original post

3 REPLIES 3
AlexisOlson
Super User
Super User

Try adding Calendar[Year] to the measure.

MAXRev = MAXX(ALLSELECTED(Calendar, Calendar[Year], Calendar[Quarter]), [Revenue])

I have already tried this. But the result is same where I get max and min for per fiscal year.

 

note, I have mentioned quarter sorry by Year to get correct grouping in visual 

OK. There may be some other calendar column interfering. Try doing ALLSELECTED on the entire table. I'm not sure exactly what columns you have but try something like this:

MAXRev =
MAXX (
    SUMMARIZE (
        ALLSELECTED ( Calendar ),
        Calendar[Year],
        Calendar[Quarter]
    ),
    [Revenue]
)

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.