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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
tbobolz
Resolver I
Resolver I

Variance of values in same column

HI All, I have a column I created with this formula "Sepsis HAI or Non = if([SEPSIS]="Y","HAI Sepsis",if([HAI or Non]="Non","No Sepsis",""))" it returns only values of: HAI Sepsis or No Sepsis or a blank. I can not figure out how to create variance between the columns items of HAI Sepsis and No Sepsis, then place it in a matrix to create the BOLDED line below in my matrix.

 

EX:

 

Month                    2018-1                                     2018-2

Financials               Cases     ALOS     Tot Cost       Cases     ALOS     Tot Cost

 

Hospital                   80           4.3          3,000           76          4.2         3,500

  HAI Sepsis             10           6.2          2,000            8           6.2         2,250

  No Sepsis              70           2.5          1,000           68          2.5         1,250

    Variance Sepsis -60          3.7         1,000          -60         3.7        1,000

 

Thanks for any help you can offer.

 

Terry

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

Hi tbobolz,

 

"I can not figure out how to create variance between the columns items of HAI Sepsis and No Sepsis"

 

<--- Could you share your original table with column [HAI Sepsis] and [No Sepsis] and clarify the logic of how to achieve the variance?

 

Regards,

Jimmy Tao

Hi,

 

Thanks for the review. My table does not have a column for HAI Sepsis and No Sepsis, rather these two values are the result of a measure in one column. This is why I am struggling.  I would like to create a row that calculates the variance between these two rows so that it displays the difference in the two rows, but the difference for the number of cases, ALOS (Average length of stay, and Tot Dir Cost.

 

Here's a link to my file with mock data.

 

Thanks in advance for any help you can offer.

Terry

 

 

https://1drv.ms/u/s!AjtlvXqTqtRPvWbQdblrjecBcVa3

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.