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
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
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

3 REPLIES 3
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

@v-shex-msft

 

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

HI @Milozebre,

 

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

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.