The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 |
---|---|
16 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
8 | |
8 |