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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Sum and filter

Hi,

I am trying to work out my net adds for the month.

  • In excel I filter on the Start Date column i.e. October dates only.
  • I then need to sum the quantity column.
  • Leaving the filter on the Start Date column I then filter on the service End Date Column for October dates only. – I then sum the quantity column
  • I now have two sum figures
  • I take away the SumQuantity for Start Date & SumQuantity for Service End Date to work out my net adds

 

Can anyone advise which would be the best Dax formula for this?

 

I can post data if need be.

1 ACCEPTED SOLUTION
technolog
Super User
Super User

To calculate the net adds for the month based on filtering by the Start Date and Service End Date columns and summing the Quantity column in Power BI using DAX, you can create two measures and then calculate the net adds. Here’s how you can do it:

Step 1: Create Measure for Start Date Sum
First, create a measure to sum the Quantity column where the Start Date is in the selected month (e.g., October).

StartDateSum =
CALCULATE(
SUM('YourTable'[Quantity]),
FILTER(
'YourTable',
MONTH('YourTable'[Start Date]) = MONTH(TODAY()) &&
YEAR('YourTable'[Start Date]) = YEAR(TODAY())
)
)
Step 2: Create Measure for Service End Date Sum
Next, create a measure to sum the Quantity column where the Service End Date is in the selected month (e.g., October).

EndDateSum =
CALCULATE(
SUM('YourTable'[Quantity]),
FILTER(
'YourTable',
MONTH('YourTable'[Service End Date]) = MONTH(TODAY()) &&
YEAR('YourTable'[Service End Date]) = YEAR(TODAY())
)
)
Step 3: Create Measure for Net Adds
Finally, create a measure to calculate the net adds by subtracting the EndDateSum from the StartDateSum.NetAdds = [StartDateSum] - [EndDateSum]

View solution in original post

1 REPLY 1
technolog
Super User
Super User

To calculate the net adds for the month based on filtering by the Start Date and Service End Date columns and summing the Quantity column in Power BI using DAX, you can create two measures and then calculate the net adds. Here’s how you can do it:

Step 1: Create Measure for Start Date Sum
First, create a measure to sum the Quantity column where the Start Date is in the selected month (e.g., October).

StartDateSum =
CALCULATE(
SUM('YourTable'[Quantity]),
FILTER(
'YourTable',
MONTH('YourTable'[Start Date]) = MONTH(TODAY()) &&
YEAR('YourTable'[Start Date]) = YEAR(TODAY())
)
)
Step 2: Create Measure for Service End Date Sum
Next, create a measure to sum the Quantity column where the Service End Date is in the selected month (e.g., October).

EndDateSum =
CALCULATE(
SUM('YourTable'[Quantity]),
FILTER(
'YourTable',
MONTH('YourTable'[Service End Date]) = MONTH(TODAY()) &&
YEAR('YourTable'[Service End Date]) = YEAR(TODAY())
)
)
Step 3: Create Measure for Net Adds
Finally, create a measure to calculate the net adds by subtracting the EndDateSum from the StartDateSum.NetAdds = [StartDateSum] - [EndDateSum]

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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