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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
hcova
Frequent Visitor

How to create DAX measures to sum positive and negative values from a filtered table


Hi All,
I am a newbie in DAX and I need some help on sum positive and negative values with a DAX measure seperately.

Here the information:

Check by customer id.jpg


In the above picture, the number (1) shows the data base. The column titled "Diff.18.17" correspond to the sales difference between 2018 and 2017 columns. (="sales 2018" - "sales 2017")
The number (2) is a simple pivot table based on table (1) data.
So what I need is DAX measures to build the table shown in (3). In other words get measures to sum the positive and negatives values from the ".Diff.18.17" showed in this pivot table.
Any help is welcome.
Regards

1 REPLY 1
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @hcova

 

Here is the reference for you.

 

https://community.powerbi.com/t5/Desktop/Variable-Range-based-on-date-filter/m-p/449496#M208072

 

Regards,

Cherie

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

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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