Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Clustered column chart and line from the same column

Dear All,    We have a requirement where column values and line values are from same column. I will explain with an example.    Here is the Data set we have now   Type  Calendar Year Calen...
  • Anonymous's avatar
    Anonymous
    7 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
            )
        )
    

    Understanding DAX Auto-Exist

    Row Context and Filter Context in DAX

    Managing “all” functions in DAX: ALL, ALLSELECTED, ALLNOBLANKROW, ALLEXCEPT

    Regards,

    Xiaoxin Sheng