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
DylanPulido
New Member

How to shoe only 2 seconds instead of this number

I have this formula, but the seconds in the table shows wrong, how can i modify the formula?

 
Tiempo Por Proceso = VAR allseconds =
banisipanama[AverageMeasure]
VAR days =
INT ( allseconds / 24 / 60 / 60 )
VAR hours =
MOD ( INT ( allseconds / 60 / 60 ); 24 )
VAR minutes =
MOD ( INT ( allseconds / 60 ); 60 )
VAR seconds =
MOD ( allseconds; 60 )
RETURN
days & "d: "
& hours
& "h: "
& minutes
& "m: "
& seconds
& "s"
 
 

image.png

 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

Perhaps:

 

VAR days =
INT ( allseconds / 24 / 60 / 60 )
VAR hours =
MOD ( INT ( allseconds / 60 / 60 ); 24 )
VAR minutes =
MOD ( INT ( allseconds / 60 ); 60 )
VAR seconds =
MOD ( allseconds; 60 )
RETURN
days & "d: "
& hours
& "h: "
& minutes
& "m: "
& INT(seconds)
& "s"


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...

View solution in original post

3 REPLIES 3
az38
Community Champion
Community Champion

Hi @DylanPulido 

try to round your initial measure

Tiempo Por Proceso = VAR allseconds =
ROUND(banisipanama[AverageMeasure];0)
VAR days =
INT ( allseconds / 24 / 60 / 60 )
VAR hours =
MOD ( INT ( allseconds / 60 / 60 ); 24 )
VAR minutes =
MOD ( INT ( allseconds / 60 ); 60 )
VAR seconds =
MOD ( allseconds; 60 )
RETURN
days & "d: "
& hours
& "h: "
& minutes
& "m: "
& seconds
& "s"

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Greg_Deckler
Community Champion
Community Champion

Perhaps:

 

VAR days =
INT ( allseconds / 24 / 60 / 60 )
VAR hours =
MOD ( INT ( allseconds / 60 / 60 ); 24 )
VAR minutes =
MOD ( INT ( allseconds / 60 ); 60 )
VAR seconds =
MOD ( allseconds; 60 )
RETURN
days & "d: "
& hours
& "h: "
& minutes
& "m: "
& INT(seconds)
& "s"


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...

Thank you, it works

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.