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
k1s2
Helper I
Helper I

Why isn't isn't my Month to Date column working?

Hi, I'm trying to get a column with a running total each month using this DAX in the column:

MTD Risks =
 CALCULATE(
    SUM(q_Compliance[Some Current Risk]),
    DATESMTD('Calendar'[Date]),
    USERELATIONSHIP(q_Compliance[Risk Assessment Date],'Calendar'[Date])
 )

...but I just get blanks in the colum:

Screenshot 2024-01-06 115817.jpg

What am I doing wrong?

 

 

 

1 ACCEPTED SOLUTION
Dangar332
Super User
Super User

hi, @k1s2 

i think below code is useful for your requirnment

MTD Risks = 
CALCULATE(
    SUM(q_Compliance[Some Current Risk]),
   DATESMTD(q_Compliance[Risk Assessment Date]),
   ALLEXCEPT('q_Compliance',q_Compliance[Risk Assessment Date])
)

Dangar332_0-1704547808898.png

 

View solution in original post

3 REPLIES 3
Dangar332
Super User
Super User

hi, @k1s2 

i think below code is useful for your requirnment

MTD Risks = 
CALCULATE(
    SUM(q_Compliance[Some Current Risk]),
   DATESMTD(q_Compliance[Risk Assessment Date]),
   ALLEXCEPT('q_Compliance',q_Compliance[Risk Assessment Date])
)

Dangar332_0-1704547808898.png

 

Thank you.  DO you have time to explain why it needs the ALLEXCEPT part? 

 

It seems counterintiutive. Surely I want it to include those dates?

k1s2
Helper I
Helper I

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.

Top Solution Authors