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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Milozebre
Helper V
Helper V

measure with total by values

Hello dear community, 

 

I call on you because I block. I looked several links here (distinct count group by, ...) and I do not find the good result.

I am a little hopeless. I do not see where I'm wrong.

Can you help me ?

Here is a part of the table that comes from Mysql, not Excel.

 

I would like to know the number of people who have the schedule 35, 31, .. I have result via a table.

I need it because once I know the number, I could multiply the number of people by their own schedule to find the number of hours worked.

AnneeMoisfirstName HorairesAttributValeur
2018-08-01PaulPaul@coucou.com32Lundi7
2018-08-01PaulPaul@coucou.com32Mardi7
2018-08-01PaulPaul@coucou.com32Mercredi7
2018-08-01PaulPaul@coucou.com32Jeudi7
2018-08-01PaulPaul@coucou.com32Vendredi3
2018-08-01PaulPaul@coucou.com32Samedi0
2018-08-01PaulPaul@coucou.com32Dimanche0
2018-08-01ValérieValérie@coucou.com32Lundi7
2018-08-01ValérieValérie@coucou.com32Mardi7
2018-08-01ValérieValérie@coucou.com32Mercredi7
2018-08-01ValérieValérie@coucou.com32Jeudi7
2018-08-01ValérieValérie@coucou.com32Vendredi0
2018-08-01ValérieValérie@coucou.com32Samedi0
2018-08-01ValérieValérie@coucou.com32Dimanche0
2018-09-01ValérieValérie@coucou.com32Lundi7
2018-09-01ValérieValérie@coucou.com32Mardi7
2018-09-01ValérieValérie@coucou.com32Mercredi7
2018-09-01ValérieValérie@coucou.com32Jeudi7
2018-09-01ValérieValérie@coucou.com32Vendredi0
2018-09-01ValérieValérie@coucou.com32Samedi0
2018-09-01ValérieValérie@coucou.com32Dimanche0
2018-09-01PaulPaul@coucou.com32Lundi7
2018-09-01PaulPaul@coucou.com32Mardi7
2018-09-01PaulPaul@coucou.com32Mercredi7
2018-09-01PaulPaul@coucou.com32Jeudi7
2018-09-01PaulPaul@coucou.com32Vendredi3
2018-09-01PaulPaul@coucou.com32Samedi0
2018-09-01PaulPaul@coucou.com32Dimanche0
2018-09-01CaroleCarole@coucou.com31Lundi7
2018-09-01CaroleCarole@coucou.com31Mardi7
2018-09-01CaroleCarole@coucou.com31Mercredi0
2018-09-01CaroleCarole@coucou.com31Jeudi7
2018-09-01CaroleCarole@coucou.com31Vendredi7
2018-09-01CaroleCarole@coucou.com31Samedi0
2018-09-01CaroleCarole@coucou.com31Dimanche0
2018-08-01CaroleCarole@coucou.com31Lundi7
2018-08-01CaroleCarole@coucou.com31Mardi7
2018-08-01CaroleCarole@coucou.com31Mercredi0
2018-08-01CaroleCarole@coucou.com31Jeudi7
2018-08-01CaroleCarole@coucou.com31Vendredi7
2018-08-01CaroleCarole@coucou.com31Samedi0
2018-08-01CaroleCarole@coucou.com31Dimanche0
2018-09-01ClarisseClarisse@coucou.com28Lundi7
2018-09-01ClarisseClarisse@coucou.com28Mardi7
2018-09-01ClarisseClarisse@coucou.com28Mercredi7
2018-09-01ClarisseClarisse@coucou.com28Jeudi7
2018-09-01ClarisseClarisse@coucou.com28Vendredi0
2018-09-01ClarisseClarisse@coucou.com28Samedi0
2018-09-01ClarisseClarisse@coucou.com28Dimanche0
2018-09-01MarylleMarylle@coucou.com28Lundi7
2018-09-01MarylleMarylle@coucou.com28Mardi7
2018-09-01MarylleMarylle@coucou.com28Mercredi0
2018-09-01MarylleMarylle@coucou.com28Jeudi7
2018-09-01MarylleMarylle@coucou.com28Vendredi7

 

here the table in Power BI without measure :

Line : Horaire

Values Number of user mail

image.png

I need a measure or colonne to obtain this : 

HorairesNb of emailTotal
288224
31131
32264
3546816380

 

Then I could then calculate the rate. The time they actually worked divided by the theoretically worked time.

 

Thank you in advance

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @Milozebre,

 

You can use below formula to get total value based on horaires and distinct email count:

Total =
DISTINCTCOUNT ( Table2[Email] ) * SELECTEDVALUE ( Table2[Horaires] )


Regards,
Xiaoxin Sheng

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

HI @Milozebre,

 

You can use below formula to get total value based on horaires and distinct email count:

Total =
DISTINCTCOUNT ( Table2[Email] ) * SELECTEDVALUE ( Table2[Horaires] )


Regards,
Xiaoxin Sheng

@Anonymous

 

Hello Thank you for answer. its working

Is it possible to get the total ? 

 

I'm sorry if I bother you. But I have to provide this information. I didn't create these tables and I started with DAX. The ultimate goal is to have the total hours worked and to have the theoretically worked total time and then make the rate.

 

Many thanks in advance

Anonymous
Not applicable

HI @Milozebre,

 

Please share a pibx file with sample data and expected result for test and coding formula:

 

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors