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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Tiitti7
Frequent Visitor

How to calculate only the positive values?

Hi,

 

I need some help how to calculate to the right chart only the positive values that are in the left chart.

In the left chart I have used measure = [Expenses] - [BM expenses] and then I can filter the negative values.

 

But how can I add only these positive values to the right chart? Now it shows the sum of total amount of the measure.

 

Tiitti7_0-1674142189318.png

 

Thank you in advance

 

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @Tiitti7 ,

 

Please try:

New measure =
SUMX (
    FILTER ( ALLSELECTED ( 'TABLENAME' ), [measure in left chart] > 0 ),
    [measure in left chart]
)

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.                      

View solution in original post

2 REPLIES 2
v-stephen-msft
Community Support
Community Support

Hi @Tiitti7 ,

 

Please try:

New measure =
SUMX (
    FILTER ( ALLSELECTED ( 'TABLENAME' ), [measure in left chart] > 0 ),
    [measure in left chart]
)

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.                      

amitchandak
Super User
Super User

@Tiitti7 ,

 

Sumx(filter(Values(Table[X-axis Column]), [measure] >0) , [Measure])

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.