Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How to create a Column Series for a Table Visual

Hi,

 

I have a visual that I want to add an additional series to.  Currently, my visual is plotting three Created Measures on the table's Column values.  The column 'Successful Intervention' is a Shared Axis and acts to break these created measures up by 'Yes' or 'No'.  I'd like to add a third series that would be a total of the Yes and No values:

 

Here is a photo of my visual currently:

 

For reference, here are the three Created Measures in DAX:

1) 7 Day Readmission Rate = SUM ( 'Post Call to Home Append'[7 Day Readmit flag] ) / SUM ( 'Post Call to Home Append'[Easy Count] )
 
2) 14 Day Readmission Rate = SUM ( 'Post Call to Home Append'[14 Day Readmit flag] ) / SUM ( 'Post Call to Home Append'[Easy Count] )
 
3) 30 Day Readmission Rate = SUM ( 'Post Call to Home Append'[30 Day Readmit flag] ) / SUM ( 'Post Call to Home Append'[Easy Count] )
 
Is there an easy way to accomplish this?  Thank you.
  • Hi, Anonymous 

     

    You need to create a new table with a single column including yes, no and total. Then use the new column in visual and modify the three measures. like this:

    30 Day Readmission Rate =
    IF (
        SELECTEDVALUE ( 'Table (2)'[Column1] ) <> "Total",
        CALCULATE (
            SUM ( 'Table'[30 DAY] ) / SUM ( 'Table'[EASY COUNT] ),
            FILTER (
                ALL ( 'Table' ),
                [Successful Readadmission] = SELECTEDVALUE ( 'Table (2)'[Column1] )
            )
        ),
        CALCULATE (
            SUM ( 'Table'[30 DAY] ) / SUM ( 'Table'[EASY COUNT] ),
            FILTER ( ALL ( 'Table' ), [Successful Readadmission] = "Yes" )
        )
            + CALCULATE (
                SUM ( 'Table'[30 DAY] ) / SUM ( 'Table'[EASY COUNT] ),
                FILTER ( ALL ( 'Table' ), [Successful Readadmission] = "No" )
            )
    )
    

    If you still have problems, please feel free to ask me.

     

    Best Regards

    Janey Guo

     

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

3 Replies

  • v-janeyg-msft's avatar
    v-janeyg-msft
    Community Support

    Hi, Anonymous 

     

    You need to create a new table with a single column including yes, no and total. Then use the new column in visual and modify the three measures. like this:

    30 Day Readmission Rate =
    IF (
        SELECTEDVALUE ( 'Table (2)'[Column1] ) <> "Total",
        CALCULATE (
            SUM ( 'Table'[30 DAY] ) / SUM ( 'Table'[EASY COUNT] ),
            FILTER (
                ALL ( 'Table' ),
                [Successful Readadmission] = SELECTEDVALUE ( 'Table (2)'[Column1] )
            )
        ),
        CALCULATE (
            SUM ( 'Table'[30 DAY] ) / SUM ( 'Table'[EASY COUNT] ),
            FILTER ( ALL ( 'Table' ), [Successful Readadmission] = "Yes" )
        )
            + CALCULATE (
                SUM ( 'Table'[30 DAY] ) / SUM ( 'Table'[EASY COUNT] ),
                FILTER ( ALL ( 'Table' ), [Successful Readadmission] = "No" )
            )
    )
    

    If you still have problems, please feel free to ask me.

     

    Best Regards

    Janey Guo

     

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

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Anonymous So if  you had a table that had your three values for the axis, Yes, No, Total then you could write your measures to basically be "get the max of your disconnected axis table". Calculate your measures filtering by that value. For the Total, you would just do both calculations and add them together. Could be more specific if you posted sample data.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Here is a sample of data from the table:

      I think the issue for me is that the Successful Readmission column only populates with Yes or No.  I'm struggling to understand how to work in the third value of 'Total'.  Would I have to add a new column and then use this column as the shared axis?