Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Finding Average Days Between Two Dates in Q&A Visual

Hi All,

 

I have a Q&A visual that includes start and end dates. I would like to identify how to phrase my questions in the visual, so that I can find out how many days are between two dates. However, I'm having a hard time figuring out what phrases I should use to get this kind of result. 

 

I've provided an example of what my dataset looks like below:

 

IDStart DateEnd Date

10001

01/01/202107/31/2021
1000202/01/202107/31/2021
1000303/01/202109/30/2021
1000407/01/202109/30/2021
1000507/01/202112/31/2021

 

When I search in the visual, I have tried different iterations of "Show me the average days between Start Date and End Date" or "How many days are there on average between Start Date and End Date for each ID". My Date fields are in Date type and my ID is in whole number type. 

 

Any help is appreciated!

 

Michael

  • Hi Anonymous ,

    You could click here to learn limitations of Power BI Q&A.

    And if you want to show the average  form start date to end date,you could use the below dax to create a new column:

    datediff = DATEDIFF('Table'[Start Date],'Table'[End Date],DAY)

    Then use Q&A:

     

    Wish it is helpful for you!

     

    Best Regards

    Lucien

2 Replies

  • v-luwang-msft's avatar
    v-luwang-msft
    Community Support

    Hi Anonymous ,

    You could click here to learn limitations of Power BI Q&A.

    And if you want to show the average  form start date to end date,you could use the below dax to create a new column:

    datediff = DATEDIFF('Table'[Start Date],'Table'[End Date],DAY)

    Then use Q&A:

     

    Wish it is helpful for you!

     

    Best Regards

    Lucien

    • Anonymous's avatar
      Anonymous
      Not applicable

      The link and suggestion were what I needed. Thank you!