March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe 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
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:
Solved! Go to Solution.
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.
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.
@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.
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?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
125 | |
85 | |
69 | |
54 | |
45 |
User | Count |
---|---|
204 | |
106 | |
98 | |
65 | |
54 |