How to get a value from last year month = to this current month?

I need the value of last year revenue of the month = current month.

I then want to take that value and multiply it by .20.

0 33 876
33 REPLIES 33

Steve
Platinum 4
Platinum 4

Try:

([last year revenue of the month = current month] * 0.20)

how do you get the [last year revenue of the month] column?

Meaning - i do not have a virtual nor column saying this. My table is filled with past information - but not one with that column.

Here is my table so far:

I want to be able to show proj revenue based on last year month revenue = current month * .20

How do you think it would be done?

I am not sure based on my table. I am having trouble getting it to know my current month in relation to that same month a year ago.

Thanks Steve

Steve i am still struggling on this.

I have created several VC and i cannot seem to get the solution.

I have tried creating:
VC Current Month
VC Current year
VC Last year same month
VC Last year

I was going to then write the expression to give the last year revenue of the same month = to this years month.

I cannot figure this out.

Example of what i need:

We are in the month of November.
So i want 2019 month of November Revenue value. I then want to multiply that by .20

Like this?

(
  SUM(
    SELECT(
      table[Revenue],
      ((EOMONTH([Date], -1) + 1) = (EOMONTH(TODAY(), -13) + 1))
    )
  )
  * 0.2
)

Replace table with the name of the table.

Where is that error displayed?

Please post a screenshot of the expression as entered.

That error comes up in the preview and when i โ€œTestโ€ it

Is the Date column in the app of type Date?

Yes:

Please use Test from Expression Assistant and post a screenshot of the entire window (minus any browser stuff) showing the error.

I have no explanation for that! Iโ€™m able to do the date comparison just fine.

Are any of your Date column values blank or not dates?

No. But this is the table. We add to this daily. Is the space below a problem?

No, blank rows are ignored by AppSheet.

I have no idea whatโ€™s going wrong. I think youโ€™ll need to engage support@appsheet.com to troubleshoot.

Is spreadsheet column C (the entire column) formatted as plain text?

This?

Yes. Please format the entire column as plain text, at least for troubleshooting.

Please also delete all blank rows and columns, so that the entirety of the spreadsheet only consists of the columns used by your app and the rows with data.

This?

It didnt helpโ€ฆ

Okayโ€ฆ

My next suggestion is to change the spreadsheet format back to Date, then copy the entire column, then paste the entire column as plain text (paste values only) (Shift+Ctrl+V) to replace the numeric dates with textual dates, then change the column format back to plain text.

Note that the above is destructive, so if you want to be able to revert should this suggestion fail, have a plan for that.

Everytime i change the format to โ€œTextโ€ in my excel sheet - it changes those dates to numbers like before.?

Even after doing what you suggestedโ€ฆ

Ah, okay. Copy the values, then change the format, then paste the values.

Ok. So now it keeps them as dates - but it still didnt change the error in my app:

Delete the blank rows and columns.

Sorry - how do i delete all rows below the ones with values and the same with the columns?

Highlight the unused columns, right-click, delete columns. Similar for rows.

It keeps the blank rows and columns in my spreadsheet

Hmmโ€ฆ Must be a difference between Excel and GSheets.

I gotta admit, Iโ€™m at a loss. I think youโ€™ll have to take this to support@appsheet.com.

Sorry!

ok. Thanks for all the help.

Steve,
Instead of trying to get same month last year revenue - How can i just take last month revenue and multiply it by .20 to project future month revenue?

Likely to have the same problem:

(
  SUM(
    SELECT(
      Revenue table[Revenue],
      ((EOMONTH([Date], -1) + 1) = (EOMONTH(TODAY(), -2) + 1))
    )
  )
  * 0.2
)
Top Labels in this Space