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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Mi_80
Helper I
Helper I

Getting the value of a measure to use in a filter

Hi 

I have a measure that can rank my data below:  I need to be able to then get other values that correspond to the record that has this rank but icannot seem to 'grab' this rank to use in a lookup of filter.  Any help please:

Rank = RANKX(CALCULATETABLE(SUMMARIZE(table,table[account],"total",SUM(table[Amount])),Filter(ALLSELECTED(Table),table[statuscodename]="Active" && [property]="Yes" &&  table[Region]=SELECTEDVALUE(table[Region]))),[total],,ASC,Skip)
 
Or can I turn this into a column but I need to be able to filter with slicer preferably
 
Thanks
1 REPLY 1
Anonymous
Not applicable

Hi @Mi_80 ,

 

If your measure works, it is suggested that you can directly add this measure into a filter. Please refer to

Add a filter to a report in Power BI - Power BI | Microsoft Learn

If you want a calculated column, please try

 

Rank =
RANKX (
    CALCULATETABLE (
        SUMMARIZE ( table, table[account], "total", SUM ( table[Amount] ) ),
        FILTER (
            Table,
            table[statuscodename] = "Active"
                && [property] = "Yes"
                && table[Region] = EARLIER ( table[Region] )
        )
    ),
    [total],
    ,
    ASC,
    SKIP
)

 

Because of the influence of some context, and the difference in the nature of the measure and calculated columns, it is possible to run incorrectly.

Please provide more details, including your data model. It would be nice to be able to provide some virtual sample data.

 

Best Regards,
Stephen Tao

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

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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