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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
Employee
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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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