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.
Hello everyone,
I need some help here...
I need to create a measure that calculates cumulative values starting by currently month but sum the past values.
Example:
Thanks
Solved! Go to Solution.
@danielmorais Maybe:
Measure =
VAR __Today = TODAY()
VAR __Start = DATE(YEAR(__Today),MONTH(__Today),1)
VAR __Month = MAX('Table'[Month])
VAR __Table = FILTER(ALL('Table'),[Month] <= __Month)
RETURN
IF(__Month < __Start,0,SUMX(__Table,[Value]))
@danielmorais Maybe:
Measure =
VAR __Today = TODAY()
VAR __Start = DATE(YEAR(__Today),MONTH(__Today),1)
VAR __Month = MAX('Table'[Month])
VAR __Table = FILTER(ALL('Table'),[Month] <= __Month)
RETURN
IF(__Month < __Start,0,SUMX(__Table,[Value]))
User | Count |
---|---|
11 | |
9 | |
6 | |
6 | |
5 |
User | Count |
---|---|
22 | |
14 | |
14 | |
9 | |
7 |