Forum Discussion

pmhoang94's avatar
pmhoang94
Icon for Helper I rankHelper I
9 years ago

Help with Measures in Clustered Column Chart

Hi all,

 I have a table SalesInOut (DateID, Amount, SalesType, FreeItem). I create a Clustered Column Chart to display data with

- Axis : DateID,

- Value: Sum(Amount).

I have a slicer DateID to filter. But if I selected date in slicer, my chart only display 1 column (date selected).

I want to display all column top 30 to date selected.

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

 

3 Replies

  • samdthompson's avatar
    samdthompson
    Icon for Memorable Member rankMemorable Member

    You have date along the x axis. That means you will only see the sliced date. Are you looking for the top 30 sales type up to the selected date? If so try:

     

    Top Sales to date =

    CALCULATE([ValSI],DATESBETWEEN('SalesInOut'[DateID],FIRSTDATE('SalesInOut'[DateID]),LASTDATE(ALLSELECTED('SalesInOut'[DateID]))))

     

    - use this as your value in the column chart.

     

    SalesType - use this as your legend on the chart

     

    Set the SalesType in the visual level filter to TopN (and select 30)

     

    I reccomend making a separate date table and creating a relationship to the DateID. You would then change any references to DateID to the new calendar table.

     

     

    // If this is a solution please mark as such