• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: How to count total number of days according to a condition?

Resolved: How to count total number of days according to a condition?

0
By Isaac Tonny on 15/03/2023 Issue
Share
Facebook Twitter LinkedIn

In this post, we will see how to resolve How to count total number of days according to a condition?

Question:

I have the following database structure:
What I want to know is how many days I’ve been in every country. For example:
DAYS SPEND IN BRASIL
Right now, I’m not able to paste code that I’m using because I’ve been trying different solutions related to QUERY, DATEDIFF… but at the end I couldn’t find the solution.
I’m asking this solution because I don’t want to use manual filters from the table.
Thanks for your help

Best Answer:

Assuming your data starts in cell A1 you don’t need any query stuff, you can use a plain formula in a new column:
if you want to put this in summary format next to a country you can replace C:C with the cell where you country is and it will work like that as well.

If you have better answer, please add a comment about this, thank you!

Source: Stackoverflow.com

google-sheets google-sheets-formula
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: How to compare two text files and and change the sign of the data in powershell?

27/03/2023

Resolved: Java Virtual Machines deleted

27/03/2023

Resolved: PyCharm cannot see my newly compiled .pyc see on import

27/03/2023

Comments are closed.

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.