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

How to change hours into days?

 
2 ACCEPTED SOLUTIONS
Pragati11
Super User
Super User

Hi @Anonymous ,

 

To convert Hours to Days, you can simply divide your field by 24.

 

hours_to_days = [your hour fileld]/24

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

View solution in original post

v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

Try the following dax to create new column:

day1 = 'Table'[Hour]/24
day2 = int('Table'[Hour]/24) & " Days, " & mod(INT('Table'[Hour]),24)   & " hours"

Final you will get:

vluwangmsft_0-1628069801446.png

 

Wish it is helpful for you!

 

Best Regards

Lucien

 

View solution in original post

6 REPLIES 6
v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

According picture,I could see the error:

In dax :

and:  &&  

or:  || 

if a and b :if(a&&b,,)

if a or b :if(a||b,,)

 

And you could create a new case ,then provide details pbix file ,technical support will follow up on your questions after the case created.

 

 

Best Regards

Lucien

v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

Try the following dax to create new column:

day1 = 'Table'[Hour]/24
day2 = int('Table'[Hour]/24) & " Days, " & mod(INT('Table'[Hour]),24)   & " hours"

Final you will get:

vluwangmsft_0-1628069801446.png

 

Wish it is helpful for you!

 

Best Regards

Lucien

 

Anonymous
Not applicable

asthanigam_0-1629107117243.png

will you please help to know what's wrong with this Dax? 

 

Thank you 

Astha Nigam

Anonymous
Not applicable

Hi @v-luwang-msft 

Thank you for your help. It actually worked exactly what I wanted. 

Pragati11
Super User
Super User

Hi @Anonymous ,

 

To convert Hours to Days, you can simply divide your field by 24.

 

hours_to_days = [your hour fileld]/24

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Anonymous
Not applicable

Hi @Pragati11 

Thank you for your help. 

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.

Top Solution Authors