Forum Discussion
Clustered column chart and line from the same column
- Anonymous7 years ago
Hi Anonymous ,
In fact, these requirements can't achieved based on default column aggregation functions. If you want to achieve some particular calculation which different than current aggregates, you need to write measure formulas with all, allexcept functions to ignore specific filter effect on current calculations and use it on line fields.
Measure = VAR currdate = DATEVALUE ( MAX ( 'Table'[Calendar Month] ) & "/1/" & MAX ( 'Table'[Calendar Year] ) ) RETURN CALCULATE ( SUM ( 'Table'[Value] ), FILTER ( ALL ( 'Table' ), DATEVALUE ( 'Table'[Calendar Month] & "/1/" & 'Table'[Calendar Year] ) <= currdate ) )Row Context and Filter Context in DAX
Managing “all” functions in DAX: ALL, ALLSELECTED, ALLNOBLANKROW, ALLEXCEPT
Regards,
Xiaoxin Sheng
Hi Anonymous ,
In fact, these requirements can't achieved based on default column aggregation functions. If you want to achieve some particular calculation which different than current aggregates, you need to write measure formulas with all, allexcept functions to ignore specific filter effect on current calculations and use it on line fields.
Measure =
VAR currdate =
DATEVALUE (
MAX ( 'Table'[Calendar Month] ) & "/1/"
& MAX ( 'Table'[Calendar Year] )
)
RETURN
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER (
ALL ( 'Table' ),
DATEVALUE ( 'Table'[Calendar Month] & "/1/" & 'Table'[Calendar Year] ) <= currdate
)
)
Row Context and Filter Context in DAX
Managing “all” functions in DAX: ALL, ALLSELECTED, ALLNOBLANKROW, ALLEXCEPT
Regards,
Xiaoxin Sheng