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
Anonymous
Not applicable

multi-criteria filter with ranking

hi,


i need to do filtering for a top-n & another criteria (e.g. region). this is to find the ranking of various organizations for their cash balance in selected region or all regions.

 

currently, i managed to come up with a dax measure for the top-n selection as follows-

 

Cash TopN =

CALCULATE (
[10000-CSH.EM],
TOPN ( [TopNSelect], orgprofile,[Org Name] , DESC )
)

 

TopNSelect is a value derived from a value table slicer for Top-N selection.

 

similarly, i have created another value table slicer for the region using number index whereby

 

north = 1
south = 2
east = 3
west = 4

 

i'm not sure if this requires AND or OR operators & how to derive a dax measure to filter both TopN & region criteria.

 

looking forward to an urgent help here.
tks & krgds, -nik

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , Try like

Cash TopN =

CALCULATE (
[10000-CSH.EM],
TOPN ( [TopNSelect], orgprofile,[Org Name] , DESC ),
table[region]="north"
)

 

or

Cash =

CALCULATE (
[10000-CSH.EM],
table[region]="north"
)

Cash TopN =

CALCULATE (
[Cash],
TOPN ( [TopNSelect], orgprofile,[Org Name] , DESC ),
table[region]="north"
)

 

You can use && or || in filter if needed

 

View solution in original post

Anonymous
Not applicable

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Try like

Cash TopN =

CALCULATE (
[10000-CSH.EM],
TOPN ( [TopNSelect], orgprofile,[Org Name] , DESC ),
table[region]="north"
)

 

or

Cash =

CALCULATE (
[10000-CSH.EM],
table[region]="north"
)

Cash TopN =

CALCULATE (
[Cash],
TOPN ( [TopNSelect], orgprofile,[Org Name] , DESC ),
table[region]="north"
)

 

You can use && or || in filter if needed

 

Anonymous
Not applicable

many tks, @amitchandak.

krgds, -nik

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.