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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register 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
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.