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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
sconconi
Frequent Visitor

How to get Totals per month and a filter

Hi all, 

 

I'm back with another problem that I can't figure out how to do solve. 

 

I've the table 'Billed' with the total invoiced in each division and month, and I want to add a column with the Total of C&R done per Division in each month (which I've in another table named 'C&R report'). I can't find a way to obtain the subtotal per division in each month, I tried different formulas but it doesn't work. 

 

Below you can find the tables that I have: 

 

C&R Report:

 

DateDivisionC&R
01-JulRetail1
01-JulVehicles0
01-JulOcean0
01-JulAir1
01-JulAir1
01-JulOcean0
01-JulOcean1
01-JulRetail0
01-JulVehicles0
01-JulRetail0
01-JulRetail1
01-JulVehicles1
01-AugOcean0
01-AugRetail1
01-AugOcean1
01-AugVehicles1
01-AugAir0
01-AugVehicles0
01-AugRetail1
01-AugAir1
01-AugAir0
01-AugVehicles1
01-AugAir0

 

Billed:

 

DateDivisionTotal billed
01-JulRetail    200,199.00
01-JulVehicles   175,839.00
01-JulOcean   134,094.00
01-JulAir   209,302.00
01-AugRetail   210,290.00
01-AugVehicles   185,043.00
01-AugOcean     98,202.00
01-AugAir   225,029.00

 

The result that I'm looking for would be as follow: 

 

DateDivisionTotal billedC&R per Division
01-JulRetail    200,199.002
01-JulVehicles   175,839.001
01-JulOcean   134,094.001
01-JulAir   209,302.002
01-AugRetail   210,290.002
01-AugVehicles   185,043.002
01-AugOcean     98,202.001
01-AugAir   225,029.001

 

 

As you can see, the column "C&R per division" got the Total of C&R done in each month for each division. 

 

How can I obtain that with DAX? 

 

I tried the following: 

 

CALCULATE(SUM('C&R Report'[To Be Reported in ET Metrics]),'C&R Report'[Division],ALLEXCEPT('C&R Ratio per Division','C&R Ratio per Division'[Date]))
 
But I get the total of C&R of the whole report.
 
Thanks for your help! Let me know if you need anything else.
1 ACCEPTED SOLUTION
sconconi
Frequent Visitor

Ohhh men, I've figured it out! I can't be more excited!
 
I thought in delete the topic, but I think is better to share the answer.
 
I solve it adding the "ALLEXCEPT" expresion. So the complete formula would be:
 
CALCULATE(
 SUMX(
  FILTER('C&R Report','C&R Report'[Billing Year/Month]
  && 'C&R Report'[Division]),'C&R Report'[To Be Reported in ET Metrics]),
   ALLEXCEPT('Calendar','Calendar'[Date].[Date]))

 

The table 'Calendar' is a Date dimension table. 

 

Hope it will help others!

View solution in original post

1 REPLY 1
sconconi
Frequent Visitor

Ohhh men, I've figured it out! I can't be more excited!
 
I thought in delete the topic, but I think is better to share the answer.
 
I solve it adding the "ALLEXCEPT" expresion. So the complete formula would be:
 
CALCULATE(
 SUMX(
  FILTER('C&R Report','C&R Report'[Billing Year/Month]
  && 'C&R Report'[Division]),'C&R Report'[To Be Reported in ET Metrics]),
   ALLEXCEPT('Calendar','Calendar'[Date].[Date]))

 

The table 'Calendar' is a Date dimension table. 

 

Hope it will help others!

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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