Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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:
Date | Division | C&R |
01-Jul | Retail | 1 |
01-Jul | Vehicles | 0 |
01-Jul | Ocean | 0 |
01-Jul | Air | 1 |
01-Jul | Air | 1 |
01-Jul | Ocean | 0 |
01-Jul | Ocean | 1 |
01-Jul | Retail | 0 |
01-Jul | Vehicles | 0 |
01-Jul | Retail | 0 |
01-Jul | Retail | 1 |
01-Jul | Vehicles | 1 |
01-Aug | Ocean | 0 |
01-Aug | Retail | 1 |
01-Aug | Ocean | 1 |
01-Aug | Vehicles | 1 |
01-Aug | Air | 0 |
01-Aug | Vehicles | 0 |
01-Aug | Retail | 1 |
01-Aug | Air | 1 |
01-Aug | Air | 0 |
01-Aug | Vehicles | 1 |
01-Aug | Air | 0 |
Billed:
Date | Division | Total billed |
01-Jul | Retail | 200,199.00 |
01-Jul | Vehicles | 175,839.00 |
01-Jul | Ocean | 134,094.00 |
01-Jul | Air | 209,302.00 |
01-Aug | Retail | 210,290.00 |
01-Aug | Vehicles | 185,043.00 |
01-Aug | Ocean | 98,202.00 |
01-Aug | Air | 225,029.00 |
The result that I'm looking for would be as follow:
Date | Division | Total billed | C&R per Division |
01-Jul | Retail | 200,199.00 | 2 |
01-Jul | Vehicles | 175,839.00 | 1 |
01-Jul | Ocean | 134,094.00 | 1 |
01-Jul | Air | 209,302.00 | 2 |
01-Aug | Retail | 210,290.00 | 2 |
01-Aug | Vehicles | 185,043.00 | 2 |
01-Aug | Ocean | 98,202.00 | 1 |
01-Aug | Air | 225,029.00 | 1 |
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:
Solved! Go to Solution.
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!
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!