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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
GvidoB
Frequent Visitor

Top 100 in a specific month-year with out using a visual to select a month-year combination

Hi Community,

 

I' m struggling with making this measure static for a specific month-year combination:

 

Top 100 April =

    calculate(
        [Values],
        filter(datetable,MONTH(datetable[Date])=4),
        filter(datetable,year(datetable[Date])=2018),
        FILTER( values(Users[Name]) ,
                    rankx ( all( Users[Name]) , [Values] , , desc ) <=100)

)

 

I need to add the bolded filters inside the last filter so that it would rank users by value in April - 2018, but nothing has worked so far. Currently it ranks users by value at all time, and then calculate value of these users in 4-2018.

 

I' d appreciate some tips! Thank you,

 

Gvido

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

Hi GvidoB,

 

Modify the measure like below and check if it can work.

 

Top 100 April =
RANKX (
    ALL ( users ),
    CALCULATE (
        [Values],
        FILTER (
            datetable,
            MONTH ( datetable[Date] ) = 4
                && YEAR ( datetable[Date] ) = 2018
        )
    ),
    ,
    desc
)

Regards,

Jimmy Tao

 

View solution in original post

1 REPLY 1
v-yuta-msft
Community Support
Community Support

Hi GvidoB,

 

Modify the measure like below and check if it can work.

 

Top 100 April =
RANKX (
    ALL ( users ),
    CALCULATE (
        [Values],
        FILTER (
            datetable,
            MONTH ( datetable[Date] ) = 4
                && YEAR ( datetable[Date] ) = 2018
        )
    ),
    ,
    desc
)

Regards,

Jimmy Tao

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors