Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

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:

Capture.PNG

Capture2.PNG

 

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.
1 ACCEPTED SOLUTION
v-janeyg-msft
Community Support
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" )
        )
)

v-janeyg-msft_0-1621842531860.png

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.

View solution in original post

3 REPLIES 3
v-janeyg-msft
Community Support
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" )
        )
)

v-janeyg-msft_0-1621842531860.png

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
Super User
Super User

@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.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Here is a sample of data from the table:

Capture3.PNG

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?  

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.