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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
sue_mcc19
New Member

Dax calculate sum for last year and last 90 days from selected value which is the current date

Hi

 

I am struggling with this, I want to get the data for last year and then the sum for the last 90 days for last year.

 

  sum range 
selected DateLast YearFromTo
16/09/202316/09/202218/06/202216/09/2022

 

Any help much appreciated.

1 ACCEPTED SOLUTION

5 REPLIES 5
Ritaf1983
Super User
Super User

Hi @sue_mcc19 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Hi

 

I hope this helps

Last 90 days sales for Last Year =$409500
Filter = 16/9/2023 
Last Yearsales
16/09/2022 $                       100.00
15/09/2022 $                       200.00
14/09/2022 $                       300.00
13/09/2022 $                       400.00
12/09/2022 $                       500.00
11/09/2022 $                       600.00
10/09/2022 $                       700.00
9/09/2022 $                       800.00
8/09/2022 $                       900.00
7/09/2022 $                   1,000.00
6/09/2022 $                   1,100.00
5/09/2022 $                   1,200.00
4/09/2022 $                   1,300.00
3/09/2022 $                   1,400.00
2/09/2022 $                   1,500.00
1/09/2022 $                   1,600.00
31/08/2022 $                   1,700.00
30/08/2022 $                   1,800.00
29/08/2022 $                   1,900.00
28/08/2022 $                   2,000.00
27/08/2022 $                   2,100.00
26/08/2022 $                   2,200.00
25/08/2022 $                   2,300.00
24/08/2022 $                   2,400.00
23/08/2022 $                   2,500.00
22/08/2022 $                   2,600.00
21/08/2022 $                   2,700.00
20/08/2022 $                   2,800.00
19/08/2022 $                   2,900.00
18/08/2022 $                   3,000.00
17/08/2022 $                   3,100.00
16/08/2022 $                   3,200.00
15/08/2022 $                   3,300.00
14/08/2022 $                   3,400.00
13/08/2022 $                   3,500.00
12/08/2022 $                   3,600.00
11/08/2022 $                   3,700.00
10/08/2022 $                   3,800.00
9/08/2022 $                   3,900.00
8/08/2022 $                   4,000.00
7/08/2022 $                   4,100.00
6/08/2022 $                   4,200.00
5/08/2022 $                   4,300.00
4/08/2022 $                   4,400.00
3/08/2022 $                   4,500.00
2/08/2022 $                   4,600.00
1/08/2022 $                   4,700.00
31/07/2022 $                   4,800.00
30/07/2022 $                   4,900.00
29/07/2022 $                   5,000.00
28/07/2022 $                   5,100.00
27/07/2022 $                   5,200.00
26/07/2022 $                   5,300.00
25/07/2022 $                   5,400.00
24/07/2022 $                   5,500.00
23/07/2022 $                   5,600.00
22/07/2022 $                   5,700.00
21/07/2022 $                   5,800.00
20/07/2022 $                   5,900.00
19/07/2022 $                   6,000.00
18/07/2022 $                   6,100.00
17/07/2022 $                   6,200.00
16/07/2022 $                   6,300.00
15/07/2022 $                   6,400.00
14/07/2022 $                   6,500.00
13/07/2022 $                   6,600.00
12/07/2022 $                   6,700.00
11/07/2022 $                   6,800.00
10/07/2022 $                   6,900.00
9/07/2022 $                   7,000.00
8/07/2022 $                   7,100.00
7/07/2022 $                   7,200.00
6/07/2022 $                   7,300.00
5/07/2022 $                   7,400.00
4/07/2022 $                   7,500.00
3/07/2022 $                   7,600.00
2/07/2022 $                   7,700.00
1/07/2022 $                   7,800.00
30/06/2022 $                   7,900.00
29/06/2022 $                   8,000.00
28/06/2022 $                   8,100.00
27/06/2022 $                   8,200.00
26/06/2022 $                   8,300.00
25/06/2022 $                   8,400.00
24/06/2022 $                   8,500.00
23/06/2022 $                   8,600.00
22/06/2022 $                   8,700.00
21/06/2022 $                   8,800.00
20/06/2022 $                   8,900.00
19/06/2022 $                   9,000.00
  $               409,500.00

For your reference.

 

mickey64_0-1694887992053.png

 

mickey64_0-1694888375660.png

 

Thanks so much

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.