Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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, @AW1976NOVA
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, @AW1976NOVA
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.
@AW1976NOVA 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?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
96 | |
79 | |
67 | |
62 |
User | Count |
---|---|
137 | |
106 | |
104 | |
81 | |
63 |