🏡 Back Home

2023-02-11

<< Назад | Вперед >>
Обзор недели: 2023-W06

Заметки за этот день:

Кассовый разрыв - вебинар

Добрый день!
Подскажите, пожалуйста, какую формулу написать в PowerQuery:
Дано - в отдельных столбцах количество: Лет; Месяцев; Дней (по состоянию на сегодня).
Нужно определить дату начала отсчета.
Я начинающая в PowerQuery, пробовала использовать #duration и Date.AddDays (Months, Years), но не получается вычислить, и в интернете не могу найти решение.
Заранее спасибо за помощь!

Can you help me create a formula for PowerQuery to calculate the start date if i have columns Years from today, Months from today, Days from today.

Can you help me create a formula for PowerQuery to calculate the start date if i have columns Years, Months, Days from today.

Yes, I can help you create a formula for PowerQuery to calculate the start date based on years, months, and days from today.

Here's one way you could do it in PowerQuery:

  1. Load the data into PowerQuery
  2. Add a custom column to the data with the following formula:

Date.AddYears(-[Years]) - Date.AddMonths(-[Months]) - Date.AddDays(-[Days])

This formula uses the Date.AddYears, Date.AddMonths, and Date.AddDays functions to subtract the number of years, months, and days, respectively, from the current date to get the start date.

The square brackets indicate a reference to the column in the data. Replace [Years], [Months], and [Days] with the actual column names in your data.

Note that this formula assumes that the columns Years, Months, and Days contain positive integer values. If they contain negative values, the start date will be in the future, and if they contain non-integer values, the result may not be what you expect.

Рекомендации:

1 - ⚪

2 - ⚪

3 - ⚪

Комментарии: