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

Creating a measure with only negative monthly sums

Hello,

 

I am attempting to single out ONLY the negative monthly values.  These values are a sum of daily values using this measure:

TotalMTD = TOTALMTD(SUM('Table1'[Value]),'Table1'[DAY])

 

This returns

May  1000

June 1500

July  500

August -400

September -500

October -300

 

What can I write in order to isolate JUST the negative values from that TOTALMTD measure?

 

Thank you very much!

1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous.

 

If I understand your requirement correctly that you only want to show the negative monthly sums. 

 

If it is, you could create another measure with the formula below and drag it as the visual level filter like below.

 

IF([Mtd]>0,0,1)

 

visual level filter.png

In addition, you also could modify your formula like below.

 

TotalMTD =
IF (
    TOTALMTD ( SUM ( 'Table1'[Value] ), 'Table1'[DAY] ) < 0,
    TOTALMTD ( SUM ( 'Table1'[Value] ), 'Table1'[DAY] ),
    BLANK ()
)

If you still need help, please feel free to ask.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous.

 

If I understand your requirement correctly that you only want to show the negative monthly sums. 

 

If it is, you could create another measure with the formula below and drag it as the visual level filter like below.

 

IF([Mtd]>0,0,1)

 

visual level filter.png

In addition, you also could modify your formula like below.

 

TotalMTD =
IF (
    TOTALMTD ( SUM ( 'Table1'[Value] ), 'Table1'[DAY] ) < 0,
    TOTALMTD ( SUM ( 'Table1'[Value] ), 'Table1'[DAY] ),
    BLANK ()
)

If you still need help, please feel free to ask.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.