cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Erase or do not sum records past three months

Hello, I will try to be as explicits as I can. I have a gallery that is filled with information from a sql table.

I am trying to implement a sum process in wich when three months have passed the month number one will not be added to the result. 

say yo have 3 items in january with different values, item 1=12, item 2=5, item3=2. in february one item= 6 and in march, two items,  item 1 = 3, item 2=4.

So in march you have 12+5+2+6+3+4=32, but in april it only sums 6+3+4=13, an so on.

Any help or suggestions on how to approach this would be great, thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft v-siky-msft
Microsoft

Re: Erase or do not sum records past three months

Hi @Anonymous ,

 

To understanding your issue better:

1. Do you want to sum all values over the last three months? What month does it start from? This month?

2. What form do you want to display the sum?

3. Are there two columns representing Date and Values? what is data type of them?

 

I have made a test on my side, I assume that you want to sum the values from this month to last three month, please refer to my following formulas.

Sum(Filter('Test-1009',Month(Dat) <=Month(Now()) &&  Month(Dat)  >= (Month(Now())-2)),Num)

“Dat” is the column name repersenting the Date column.

If you don't want to start from this month, just try to modify the Now() to what you want.

Annotation 2019-10-09 161744.png

Take a try, if this doesn't work, please let me know.

Best regards,

Sik

View solution in original post

2 REPLIES 2
Microsoft v-siky-msft
Microsoft

Re: Erase or do not sum records past three months

Hi @Anonymous ,

 

To understanding your issue better:

1. Do you want to sum all values over the last three months? What month does it start from? This month?

2. What form do you want to display the sum?

3. Are there two columns representing Date and Values? what is data type of them?

 

I have made a test on my side, I assume that you want to sum the values from this month to last three month, please refer to my following formulas.

Sum(Filter('Test-1009',Month(Dat) <=Month(Now()) &&  Month(Dat)  >= (Month(Now())-2)),Num)

“Dat” is the column name repersenting the Date column.

If you don't want to start from this month, just try to modify the Now() to what you want.

Annotation 2019-10-09 161744.png

Take a try, if this doesn't work, please let me know.

Best regards,

Sik

View solution in original post

Anonymous
Not applicable

Re: Erase or do not sum records past three months

Thank you for the reply. What I did was to take the difference in days between today and 120 that is the days in three months. I will try this solution

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,508)