Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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

@Anonymous

 

 

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

Regards
Zubair

Please try my custom visuals

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

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

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

HI @Anonymous

 

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

Please try my custom visuals
Anonymous
Not applicable

Sorry no

I get the same result... 😞

@Anonymous

 

 

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

Regards
Zubair

Please try my custom visuals
Anonymous
Not applicable

I thought I did it...actually no 😄

It works!

Thank you!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.