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.
I have an IF statement that I thought was working fine until I just realized it is calculating the same drug cost savings for every instance so the numbers are inflated.
We have drugs that we switch to lower cost drugs and I have a column with the Monthly Cost Savings if they accept the switch.
Some members hhave more than one intervention where we have reached out to them multiple times. If they accept the recommendation, the If statement is:
Monthly Cost Savings = IF(Sheet1[status_id]=1 || Sheet1[Status_id = 4,Sheet1[Monthly Cost Savings Table],0)
I need to somehow differentiate to only add the cost savings once per distinct drug per member.
Does anyone have any idea how to do this? I tried to just add a filter to the end of the statement but it errored out.
Thanks for any help!
Solved! Go to Solution.
Hi @shelbsassy,
If I understand you correctly, you should be able to use the formula below to create a new measure to calculate the total cost savings by distinct drug name and member ID, then show the measure on the Card visual in your scenario.
Measure = SUMX ( SUMMARIZE ( Sheet1, Sheet1[drug name], Sheet1[member ID], "Costs", MAX ( Sheet1[Monthly Cost Savings] ) ), [Costs] )
Regards
@v-ljerr-msft wrote:Hi @shelbsassy,
If I understand you correctly, you should be able to use the formula below to create a new measure to calculate the total cost savings by distinct drug name and member ID, then show the measure on the Card visual in your scenario.
Measure = SUMX ( SUMMARIZE ( Sheet1, Sheet1[drug name], Sheet1[member ID], "Costs", MAX ( Sheet1[Monthly Cost Savings] ) ), [Costs] )
Regards
Hi @v-ljerr-msft,
For my own reference, the following measure will work per distinct drug and member?
Thanks
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 | |
93 | |
75 | |
62 | |
50 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |