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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

filter a table based on measure

I have a margin created by What_if parameter. 

I have three measures: 
m1= [a]

m2= [b]

m3= ([a]+[b]) *margin/100

 

m3 is responding to the margin selection.

Now, I want a list of names. When I create a table and put Name and m3 in the table, it works perfectly, something like below:

name1 --> m3 for name1

name2--> m3 for name2

etc

 

When m3 is calculated per person, for some people it is negative and for some people it is positive. 

 

Now, I want to have two card visuals which show the sum of m3 when it is negative per person and sum of m3 when it is positive, how can I do this? 

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

Hello @Anonymous 

Give these a try

Positive M3 =
SUMX ( FILTER ( VALUES ( YourTable[Names] ), [M3] > 0 ), [M3] )
Negative M3 =
SUMX ( FILTER ( VALUES ( YourTable[Names] ), [M3] < 0 ), [M3] )

View solution in original post

1 REPLY 1
jdbuchanan71
Super User
Super User

Hello @Anonymous 

Give these a try

Positive M3 =
SUMX ( FILTER ( VALUES ( YourTable[Names] ), [M3] > 0 ), [M3] )
Negative M3 =
SUMX ( FILTER ( VALUES ( YourTable[Names] ), [M3] < 0 ), [M3] )

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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