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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

How to calculate LTV

Hi Team , 

On the lifetime value graph (right) you have on the y-axis money gbp, and on the x-axis the number of months, so how much money  made on average after the first 3 months, 6 months, 9 months,12month .Please let me know approach to create this graph in Power Bi

atul_03_0-1683541867658.png

Sample Data

 

patientIDtotalinvoiceDateinvoiceID
2£0.0030-04-2022 00:001755704
26£97.5004-04-2023 00:001865570
26£97.5004-04-2023 00:001865595
26£47.5006-04-2023 00:001866686
26£47.5011-04-2023 00:001867180
26£47.5013-04-2023 00:001867900
26£47.5018-04-2023 00:001869237
26£47.5020-04-2023 00:001870078
26£47.5025-04-2023 00:001871132
26£47.5027-04-2023 00:001871988
95£45.0022-02-2022 00:001732839
95£45.0019-04-2022 00:001751693
95£0.0006-05-2022 00:001758092
95£45.0014-06-2022 00:001771056
95£45.0026-07-2022 00:001785525
107£2.5005-12-2022 00:001828921
107-£2.5005-12-2022 00:001828922
147£35.0004-01-2022 00:001715616
147£40.0011-01-2022 00:001717998
147£40.0025-01-2022 00:001722622
147£35.0008-02-2022 00:001727367
147£40.0008-02-2022 00:001727399
147£40.0022-02-2022 00:001732375
147£35.0001-03-2022 00:001734711
147£40.0008-03-2022 00:001737359
147£35.0022-03-2022 00:001742137
147£40.0022-03-2022 00:001742181
147£40.0003-05-2022 00:001755919
147£35.0003-05-2022 00:001755952
147£40.0017-05-2022 00:001761237
147£35.0007-06-2022 00:001767905
147£40.0007-06-2022 00:001767923
147£40.0021-06-2022 00:001772963
147£35.0028-06-2022 00:001775334
147£40.0008-07-2022 00:001779579
147£35.0019-07-2022 00:001782551
147£40.0019-07-2022 00:001782573
147£40.0002-08-2022 00:001787571
147£35.0009-08-2022 00:001790017
147£35.0030-08-2022 00:001796522
147£40.0030-08-2022 00:001796557
147£40.0013-09-2022 00:001801531
147£35.0020-09-2022 00:001803640
147£40.0027-09-2022 00:001806009
147£40.0011-10-2022 00:001810655
147£35.0018-10-2022 00:001813129
147£40.0025-10-2022 00:001815476
147£38.5008-11-2022 00:001820107
147£40.0008-11-2022 00:001820108
147£44.0025-11-2022 00:001826128
147£38.5001-12-2022 00:001827825
147£44.0009-12-2022 00:001830455
147£44.0023-12-2022 00:001834771
147£38.5005-01-2023 00:001837337
147£44.0006-01-2023 00:001837843
147£44.0020-01-2023 00:001842422
147£38.5026-01-2023 00:001844090
147£44.0003-02-2023 00:001846780
147£44.0008-02-2023 00:001848174
147£44.0010-02-2023 00:001849108
147£38.5016-02-2023 00:001850850
147£44.0017-02-2023 00:001851282
147£44.0003-03-2023 00:001855751
147£38.5009-03-2023 00:001857484
147£44.0017-03-2023 00:001860101
147£38.5030-03-2023 00:001864087
147£44.0031-03-2023 00:001864680
147£44.0015-04-2023 00:001868516
147£38.5020-04-2023 00:001869700
147£44.0028-04-2023 00:001872094
187£10.0019-01-2022 00:001721066
187£10.0014-02-2022 00:001729798
187£0.0028-02-2022 00:001734549
187£10.0028-02-2022 00:001734578
187£10.0014-03-2022 00:001739729
187£10.0028-03-2022 00:001744357
187£10.0011-04-2022 00:001749336
187£10.0011-04-2022 00:001749345
187£10.0025-04-2022 00:001753605
214£22.5016-09-2022 00:001803338
214£50.0004-10-2022 00:001808464
214£50.0029-11-2022 00:001826983
218£36.0004-01-2022 00:001715587
218£36.0001-02-2022 00:001724976
218£36.0008-03-2022 00:001737421
218£36.0019-04-2022 00:001751260
218£36.0017-05-2022 00:001761302
218£36.0014-06-2022 00:001770642
218£36.0012-07-2022 00:001780203
218£36.0009-08-2022 00:001790084
218£36.0006-09-2022 00:001799123
218£40.0018-10-2022 00:001813177
218£40.0015-11-2022 00:001822289
218£40.0013-12-2022 00:001831366

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

Please have a try.

measure =
CALCULATE (
    AVERAGE ( TABLE[total] ),
    FILTER (
        ALL ( table ),
        table[patientID] = SELECTEDVALUE ( table[patientID] )
            && table[invoice] <= EDATE ( SELECTEDVALUE ( table[invoice] ), -3 )
    )
)

 

More details: Customer Lifetime Value (LTV) | KPI example | Geckoboard

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

Please have a try.

measure =
CALCULATE (
    AVERAGE ( TABLE[total] ),
    FILTER (
        ALL ( table ),
        table[patientID] = SELECTEDVALUE ( table[patientID] )
            && table[invoice] <= EDATE ( SELECTEDVALUE ( table[invoice] ), -3 )
    )
)

 

More details: Customer Lifetime Value (LTV) | KPI example | Geckoboard

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors