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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Another Sumx ....

Hi

 

I have a dataset that contains billing for each project for each month. What I am presenting in the matrix is the billing delta versus the prior month for each project (line item).

 

For the line items, the values are correct. However, the total is showing the delta month compared to month instead of summing the line items. I know it has to be solved with sumx/summarize, but I am not able to figure this out.

 

My formula is:

Billing vPM = 
//Original Formula
Calculate(sum('All BPOC Reports'[Actual Billing])-CALCULATE(SUM('All BPOC 
Reports'[Actual Billing]),PARALLELPERIOD('Calendar'[Date],-1,MONTH)))

//My Sumx Approach
if(isfiltered('All BPOC Reports'[PROJEKTNR]),
    calculate(sum('All BPOC Reports'[Actual Billing]))-CALCULATE(SUM('All BPOC Reports'[Actual Billing]),PARALLELPERIOD('Calendar'[Date],-1,MONTH)),
        sumx('All BPOC Reports',
        calculate(sum('All BPOC Reports'[Actual Billing]))-CALCULATE(SUM('All BPOC Reports'[Actual Billing]),PARALLELPERIOD('Calendar'[Date],-1,MONTH))))

 

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Does this measure work?

=if(isfiltered('All BPOC Reports'[PROJEKTNR]),[billing vpm],sumx(VALUES('All BPOC Reports'[PROJEKTNR]),[billing vpm]))

Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

Does this measure work?

=if(isfiltered('All BPOC Reports'[PROJEKTNR]),[billing vpm],sumx(VALUES('All BPOC Reports'[PROJEKTNR]),[billing vpm]))

Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

it works @Ashish_Mathur  - thank you so much! 🙂

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@Anonymous , Try datesmtd or previousmonth with a date table

example

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))
this month =MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH('Date'[Date])))
last MTD (complete) Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH))))
previous month value = CALCULATE(sum(''Table''[total hours value]),previousmonth('Date'[Date]))

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi



Appreciate your Kudos.

diff = [MTD Sales]-[last MTD Sales]
diff % = divide([MTD Sales]-[last MTD Sales],[last MTD Sales])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors