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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Melmoth
New Member

Problem with Total in column (measures)

Hi, first post here!

 

I am still pretty new to DAX and PowerBI. I see that this is a common issue, yet after a couple of hours of browsing I couldn't find a solution that works for me.

 

I have a Table Visual with Year, Month, Current Calls, Previous Month Calls (hidden), MoM Change, MoM % Change. I have been able to have the monthly changes). However, of course, the Total doesn't work for some of the columns probably because of the row context of the measures. 

 

Here's the Visual as of now (The current slicer is set from 8/1/2024 to 9/30/2025, and the user can set any date from 1/1/2020 onward, partial months included).

Melmoth_0-1759349220454.png

 

This is the code for the MoM Change column:

 
MoM Change = 
// This expression calculates the difference in Calls workload between a month and its previous month
// The expression eliminates the first month, and the prior month.
    VAR DifferenceMoM =
        IF(
            NOT ISBLANK ([CFS_CurrMonthValue]) && NOT ISBLANK([CFS_Previous_Month]), // Do not display values on Matrix if empty                
             [CFS_CurrMonthValue]-[CFS_Previous_Month]
            )
    
    RETURN DifferenceMoM

 

(in case you're wondering why I have the two NOT ISBLANK statements, it is to avoid the first month (see August) to be filled with the difference with july #'s, and to prevent seing October at the end).

 

This is the code for [CFS_CurrMonthValue]:

CFS_CurrMonthValue = 
    VAR CurrMonthValue = SUM('Table'[Calls])
    
    VAR CurrMonthValueReturn =
        IF(
            NOT ISBLANK (CurrMonthValue),
                CALCULATE(
                SUM('Table'[Calls]),
                DATEADD('tblCalendar'[Date],0,MONTH)
                )
        )    
        RETURN CurrMonthValueReturn

 

This is the code for [CFS_Previous_Month]:

CFS_Previous_Month = 
    VAR CurrMonthValue = SUM('Table'[Calls])
    
    VAR PrevMonthValue =
        IF(
            NOT ISBLANK (CurrMonthValue),
                CALCULATE(
                SUM('Table'[Calls]),
                DATEADD('tblCalendar'[Date],-1,MONTH)
                )
        )    
        RETURN PrevMonthValue

 

One important thing: I use the sum because 'Table'[Calls] is either 1 or 0. If it's is a Call, then it's a 1; otherwise, it's a 0. The table, basically, is as follows:

 

Ticket (unique id)DateCall (1/0)Closed (1/0)
1234509/01/202511
2231208/05/202501
1231209/15/202410

 

The % Change column is in a similar situation, no need for me to add it here.

 

Thank you to whoever can help!

 

7 REPLIES 7
v-sathmakuri
Community Support
Community Support

Hi @Melmoth ,

 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.

 

Thank you!!

v-sathmakuri
Community Support
Community Support

Hi @Melmoth ,

 

Could you please let us know if the provided response helped in resolving the issue. If you have any further questions we are happy to address.

 

Thank you!!

Unfortunately it didn't help, however I modified the dashboard quite a bit. I think that the issue is that the slicer was not using the calendar table. Now it works.

 

So, my recommendation is, if everything else fail, try to use the calendar table as the filter within your slicer.

Thank you for confirming that using calendar table worked for you.

v-sathmakuri
Community Support
Community Support

Hi @Melmoth ,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Could you please share the sample pbix file where the issue occurs, so that we can work on it and assist you with a solution.

 

Thank you!!

Hi @v-sathmakuri , unfortunately I can't share the pbix file. It's so strange that just such a simple calculation is taking me so long to figure out. I even tried using SUMMARIZE, SUMX etc. The row by row works, but the total doesn't.

Hi @Melmoth ,

 

I have added the totals column using the M Query. Attached the pbix file for reference. Please let us know if you still have any further questions.

 

Thanks & Regards,

Rekha Athmakuri.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.