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

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
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.