cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
shelbsassy Member
Member

Re: How to get total cost savings by distinct drug name and member ID with an if statement

Thank you so much that worked PERFECTLY!  Exactly what I was looking for!  Thank you!

shelbsassy Member
Member

Re: How to get total cost savings by distinct drug name and member ID with an if statement

Looks like you had the same idea as v-ljerr-msft which worked just perfect!  Thank you so much for your time in helping me!  I really appreciate it!

Abduvali Established Member
Established Member

Re: How to get total cost savings by distinct drug name and member ID with an if statement

No, @v-ljerr-msft should be getting all the credit for providing the correct solution =D

shelbsassy Member
Member

Re: How to get total cost savings by distinct drug name and member ID with an if statement

I just realized I think I need the IF statement in there somewhere because I only want to calculate if the intervention was accepted.  I tried Test 2 = IF(Sheet1[status_id] = 1 || Sheet1[status_id] = 4,[Cost Test],0) where Cost Test is the formula you recommended that works so I just need to figure out how to only calculate if the status ID is 1 or 4.  

Highlighted
shelbsassy Member
Member

Re: How to get total cost savings by distinct drug name and member ID with an if statement

I am getting this error when I try to use the formula I posted:  Test 2 = IF(Sheet1[status_id] = 1 || Sheet1[status_id] = 4,[Cost Test],0)

 

A circular dependency was detected: Sheet1[Test 2], Sheet1[Pending #_], Sheet1[Test 2].

 

I also tried  Test 2 = HELP = IF(Sheet1[status_id] = 1 || Sheet1[status_id] = 4,[Cost Test],SUMX(Summarize(sheet1,Sheet1[Drug Name],Sheet1[PAT_Primary_Identifier],"Cost Savings",MAX(Sheet1[Monthly Cost Savings])),[Cost Savings]))

 

but I am getting this error: A circular dependency was detected: Sheet1[HELP], Sheet1[Pending #_], Sheet1[HELP].