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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
corp_scorp
Frequent Visitor

Max Value of Slicer while multiple Values are selected

Hello there,

 

i have a Slicer of Monthname where the User can choose more than one Month. i am searching for a Dax- Formula where the Measure returns the Max of the choosen Months.

for example: if MonthName Slicer got Jan, Feb and Mar as selected Values... Mar should be the Result
i tried already a Measure with MonthNumbers but with MonthName the Result is not the Same...

https://www.dropbox.com/s/9nqmwxxw7ezckc1/sample.pbix?dl=0 

1 ACCEPTED SOLUTION
Barthel
Solution Sage
Solution Sage

Hey @corp_scorp,

You could try this measure:

Max Month Number of selected Values = 
VAR _max_month_number =
    MAX ( 'Date'[MonthNumber] )
RETURN
    CALCULATE ( 
        SELECTEDVALUE ( 'Date'[MonthName] ),
        'Date'[MonthNumber] = _max_month_number
    )

View solution in original post

2 REPLIES 2
corp_scorp
Frequent Visitor

@Barthelworks like a charm:)

Barthel
Solution Sage
Solution Sage

Hey @corp_scorp,

You could try this measure:

Max Month Number of selected Values = 
VAR _max_month_number =
    MAX ( 'Date'[MonthNumber] )
RETURN
    CALCULATE ( 
        SELECTEDVALUE ( 'Date'[MonthName] ),
        'Date'[MonthNumber] = _max_month_number
    )

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.