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
Anonymous
Not applicable

Calculate the count of words and then add hours infront of it.

Hello, 

 

I have this type of leaves.

leave.PNG

what I want to do is calculate the count of every leave individually then add the hours infront of it.

asd.PNG

For example NT count is 10 then add all the hours 10 times. 

If count of SL is 4 then add all the hours 4 times.

this is just a reference image there are hours value can be any not always 8.5. sometimes 10, 4 , etc 

just need the sum of it by leave count.

I want to make a measure. 

 

thanks 

 

2 REPLIES 2
v-diye-msft
Community Support
Community Support

Hi @Anonymous 

 

Not quite understand the requirements, please kindly elaborate more with detailed data and expected results. dummy pbix is appreciated.

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
Greg_Deckler
Community Champion
Community Champion

Not entirely certain I have this, but maybe put your "Leave" column in a visual and then use this measure:

 

Measure =
  VAR __Count = COUNTROWS('Table')
  VAR __Sum = SUM('Table'[Hours])
RETURN
  __Count * __Sum


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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