Forum Discussion

sufiyanakhtar's avatar
4 years ago
Solved

Static Data in chart

Hey Power users, I am looking forward to achieving something in Power BI. I have a bar chart and a slicer. The slicer contains the names of manufacturers and the bar chart shows the top 10 items sup...
  • v-easonf-msft's avatar
    v-easonf-msft
    4 years ago

    Hi, sufiyanakhtar 

    Please try follow setps:

    1. Add a new calculated table showing the top 10 items from all manufacturers and build a one-to-many relationship with the fact table.

    Calculated table:

    New Table =
    CALCULATETABLE (
        DISTINCT ( 'Table'[Items] ),
        TOPN (
            10,
            SUMMARIZE ( 'Table', 'Table'[Items], "Total Value", SUM ( 'Table'[Value] ) ),
            [Total Value], DESC
        )
    )
    

    2. Add a measure like below:

    Total Value = SUM('Table'[Value])+0

    3. Replace your original 'Axis' and 'Values' in bar chart
    4. Show items with no data and filter out all blank values in the filter pane

    Result:

    Please check my sample pbix for more details.

     

    Best Regards,
    Community Support Team _ Eason