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

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.

Reply
adi_dasturkar
Regular Visitor

How to transfer the current month value to next month.

At start till date "Active patients" are 0. Then "Total Active patients" = "Active Patients" + "New Patients" - "Drop off Patients".
And 2019 November's "Total Active patients" i.e 2 which is the December's "Active Patient".  And 2019 December "Total Active Patients" i.e 4 which is 2020 January's "Active Patients" and so on... 

DateActive PatientsNew PatientsDrop off PatientsTotal Active Patients
Nov-190312
Dec-1922 4
Jan-204123
Feb-2031 4
Mar-2041 5
Apr-205216
May-20610214
Jun-20144117

 

How do I calculate "Active Patients" column In Power BI Using Dax.

Please Help me.


Thanks In Advance!

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @adi_dasturkar,

I think you can try to use the following calculated column formula to do aggregate on new and drop patient amount.

 

Active Patients =
SUMX (
    FILTER (
        SUMMARIZE ( Table, [Date], "Actived", [New Patients] - [Drop off Patients] ),
        [Date] < EARLIER ( Table[Date] )
    ),
    [Actived]
)+0

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @adi_dasturkar,

I think you can try to use the following calculated column formula to do aggregate on new and drop patient amount.

 

Active Patients =
SUMX (
    FILTER (
        SUMMARIZE ( Table, [Date], "Actived", [New Patients] - [Drop off Patients] ),
        [Date] < EARLIER ( Table[Date] )
    ),
    [Actived]
)+0

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
lbendlin
Super User
Super User

This measure works for the individual rows, it will need to be adjusted for the totals.

 

TotalPatients = sumx(Patients,Patients[Active Patients]+Patients[New Patients]-Patients[Drop off Patients])

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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