Forum Discussion

Aimeeclaird's avatar
Aimeeclaird
Icon for Helper IV rankHelper IV
4 years ago
Solved

Slicer that does not affect a value on X-axis for comparisons

Hi, I want to create a column chart visual that allows users to compare the overall to specifics.   For example, I am working with school data and want to show the national average in the first col...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Aimeeclaird ,

     

    parry2k ‘s post is in detail. Only as a supplement, I created a new table similar with his blog:

    New table =
    ADDCOLUMNS (
        UNION ( { "National Average" }, VALUES ( 'Table'[School] ) ),
        "Average",
            IF (
                [Value] = "National Average",
                AVERAGE ( 'Table'[Average] ),
                CALCULATE (
                    AVERAGE ( 'Table'[Average] ),
                    FILTER ( 'Table', [School] = [Value] )
                )
            )
    )

    Here is the final output:

     

    Actually I am not clear about this :Would you be able to advise of a solution that doesn't involve having the actuals as a value. We need to calculate the 'actual' based on all data in the data table. 

     

    Please explain more or provide us with your expected output.

     

    Best Regards,
    Eyelyn Qin
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.