Forum Discussion

powerbinoobster's avatar
3 years ago
Solved

Help creating the following Chart.

So I have a data set that has the following columns:   Number, Status, Priority, Date Originated Status can be "Working", "Pending", "Incorporated" Priority can be "Yellow", "Orange", or "Red"  ...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi powerbinoobster ,

     

    As a workaround, you can create a seperate table as follows. I created by entering data.

    Then create the following measure, which you can replace and modify it as needed.

    Conditional Count = 
    VAR _incorporated =
        CALCULATE (
            COUNT ( 'Table'[ID] ),
            FILTER ( ALLSELECTED ( 'Table' ), [Status] = "Incorporated" )
        )
    VAR _red =
        CALCULATE (
            COUNT ( 'Table'[ID] ),
            FILTER ( ALLSELECTED ( 'Table' ), [Priority] = "Red" )
        )
    VAR _orange =
        CALCULATE (
            COUNT ( 'Table'[ID] ),
            FILTER ( ALLSELECTED ( 'Table' ), [Priority] = "Orange" )
        )
    VAR _yellow =
        CALCULATE (
            COUNT ( 'Table'[ID] ),
            FILTER ( ALLSELECTED ( 'Table' ), [Priority] = "Yellow" )
        )
    RETURN
        SWITCH (
            SELECTEDVALUE ( 'Table (2)'[Attribute] ),
            "Status", _incorporated,
            "Priority",
                SWITCH (
                    SELECTEDVALUE ( 'Table (2)'[Value] ),
                    "Red", _red,
                    "Orange", _orange,
                    "Yellow", _yellow
                )
        )
    

    Sample data:

     

    Expected result:

     

    You can download my attachment for more details.

     

                                                                                                                                                             

    Best Regards,

    Stephen Tao

     

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