Forum Discussion

pmhoang94's avatar
pmhoang94
Helper I
9 years ago
Solved

Issue with Clustered column chart

Hi all,

 

I have table SalesInOut (DateID, Amount, SalesType, FreeItem).

I create a Clustered column chart with axis: DateID, Value: measure

     ValSI = CALCULATE(SUM(SalesInOut[Amount])/1000000,SalesInOut[SalesType] = "I", SalesInOut[FreeItem] = FALSE())

I create a slicer to filter my chart.

I want to my chart display all DateID from begin date to date that selected.

But when I selected DateID in slicer, my chart only display 1 column which is selected.

Anybody help me?

This is link my report: https://drive.google.com/file/d/0B1L_chy-uFDKVkkzUE5GU0pvMVE/view?usp=sharing

  • Hi pmhoang94,

     

    Based on my understanding, you want the chart to display data from first date to the selected date from slicer, right?

     

    One simple way to achieve that is changing the slicer from "Dropdown" to "Before".

     

    Another option is separate the DateID from SalesInOut table to a single table. And modify the measure as below:

    DateID = SELECTCOLUMNS(SalesInOut,"DateID",SalesInOut[DateID])
    
    Top Sales to date =
    CALCULATE (
        [ValSI],
        DATESBETWEEN (
            'SalesInOut'[DateID],
            FIRSTDATE ( 'SalesInOut'[DateID] ),
            MAX ( DateID[DateID] )
        )
    )

    Add DateID[DateID] into slicer.

     

    Best regards,
    Yuliana Gu

1 Reply

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Microsoft Employee

    Hi pmhoang94,

     

    Based on my understanding, you want the chart to display data from first date to the selected date from slicer, right?

     

    One simple way to achieve that is changing the slicer from "Dropdown" to "Before".

     

    Another option is separate the DateID from SalesInOut table to a single table. And modify the measure as below:

    DateID = SELECTCOLUMNS(SalesInOut,"DateID",SalesInOut[DateID])
    
    Top Sales to date =
    CALCULATE (
        [ValSI],
        DATESBETWEEN (
            'SalesInOut'[DateID],
            FIRSTDATE ( 'SalesInOut'[DateID] ),
            MAX ( DateID[DateID] )
        )
    )

    Add DateID[DateID] into slicer.

     

    Best regards,
    Yuliana Gu