cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

Daily average

Hello everyone,

I look for an issue to get a daily average. It means so simple...but I didn't solve it! 😞

 

Ex :

Date1 - Something1 - Nb1

Date2 - Something2 - Nb2

Date2 - Something3 - Nb3

 

I would get average = SUM(Nb from Something1)/DISTINCTCOUNT(Date) -> So Nb1/2!

But I get Nb1/1!!

 

When I ask it on general result, it's ok cause there is a Nb on each date, but when I ask it by Something, it count only the dates where there is Something (so 1 date instead of 2 dates).

 

Am I clear?

 

Thanks you for all your support,

Baptiste

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Daily average

@bapt69

 

 

H/jour =
DIVIDE (
    SUM ( 'Imputations & Frais'[Nb heures] ),
    CALCULATE (
        DISTINCTCOUNT ( 'Imputations & Frais'[Date] ),
        ALL ( 'Imputations & Frais' )
    )
)
Regards,
Zubair


View solution in original post

5 REPLIES 5
Highlighted
Helper IV
Helper IV

Re: Daily average

That's my measure that doesn't work as I would like :

H/jour = DIVIDE(SUM('Imputations & Frais'[Nb heures]);DISTINCTCOUNT('Imputations & Frais'[Date]))

Highlighted
Super User III
Super User III

Re: Daily average

HI @bapt69

 

I hope I understood the question correctlySmiley Tongue

 

Try replacing DistinctCount with only COUNT

 

H/jour = DIVIDE(SUM('Imputations & Frais'[Nb heures]);COUNT('Imputations & Frais'[Date]))

Regards,
Zubair


Highlighted
Helper IV
Helper IV

Re: Daily average

Sorry no

I get the same result... 😞

Highlighted
Super User III
Super User III

Re: Daily average

@bapt69

 

 

H/jour =
DIVIDE (
    SUM ( 'Imputations & Frais'[Nb heures] ),
    CALCULATE (
        DISTINCTCOUNT ( 'Imputations & Frais'[Date] ),
        ALL ( 'Imputations & Frais' )
    )
)
Regards,
Zubair


View solution in original post

Highlighted
Helper IV
Helper IV

Re: Daily average

I thought I did it...actually no 😄

It works!

Thank you!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors