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.
I have an s-curve graph that compares actual vs. target sales for Quarter 1 of the year. I have created a measure like this:
Cumulative Sum Actual =
VAR CurrentQtr = MAX('Table'[Quarter])
RETURN
CALCULATE(SUM('Table'[Sales),
FILTER(
ALLSELECTED('Table'), 'Table'[Quarter] = CurrentQtr && 'Table'[SalesDate] <=MAX('Table'[SalesDate])
)
)
How do I combine Q1 s-curve with Q2, Q3, Q4 in the same visual? Do I need to create a measure for each quarter?
Thanks!
Solved! Go to Solution.
HI @nikkirai,
I'd like to suggest you extract the quarter field to use with valued function, then these calculation will as be grouped by quarter and autofit with different quarters.
Cumulative Sum Actual =
VAR CurrentQtr =
MAX ( 'Table'[Quarter] )
RETURN
CALCULATE (
SUM ( 'Table'[Sales] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[SalesDate] <= MAX ( 'Table'[SalesDate] )
),
VALUES ( 'Table'[Quarter] )
)
Regards,
Xiaoxin Sheng
HI @nikkirai,
I'd like to suggest you extract the quarter field to use with valued function, then these calculation will as be grouped by quarter and autofit with different quarters.
Cumulative Sum Actual =
VAR CurrentQtr =
MAX ( 'Table'[Quarter] )
RETURN
CALCULATE (
SUM ( 'Table'[Sales] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[SalesDate] <= MAX ( 'Table'[SalesDate] )
),
VALUES ( 'Table'[Quarter] )
)
Regards,
Xiaoxin Sheng
yes
User | Count |
---|---|
78 | |
74 | |
43 | |
32 | |
28 |
User | Count |
---|---|
104 | |
95 | |
51 | |
50 | |
46 |