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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors