The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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:
What am I doing wrong?
Solved! Go to Solution.
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])
)
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])
)
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?
Power BI file is here:
https://drive.google.com/file/d/1r6eNKsoxmrnzqjjIUiQG-XLHAcRO0IBk/view?usp=drive_link