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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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