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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Yorah42
New Member

[h]:mm:ss vers Durée | [h]:mm:ss to Duration

Bonjour,

 

Je ne cherche pas d'aide aujourd'hui. J'ai eu un souci sur PowerBI qui ne parvenait pas à détecter le format [h]:mm:ss de Excel en tant que Durée.

 

Je crée donc ce post après avoir trouvé une solution simple à mon problème qui pourrait aider d'autres qui auraient pu être à ma place.

 

Les étapes à suivre : 

- Charger votre source de données Excel.

 

- Ouvrir Power Query via le bouton "Transformer les données"

 

- Sélectionner votre colonne contenant normalement votre durée les valeurs apparaissent sûrement sous la format dune date complète (Date/Heure).

 

- Choisir le type Heure pour enlever la date et garder seulement les heures au format hh:mm:ss (Cliquer sur ajouter une nouvelle étape et non Remplacer l'actuelle) - Cette étape est primordiale sinon PowerBI gardera le jour en tant que valeur à savoir 24h.

 

- Ensuite, choisir le type "Nombre décimal" (Cliquer sur ajouter une nouvelle étape et non Remplacer l'actuelle)

 

- Puis vous pouvez maintenant passer votre en colonne en type Durée

 

En espérant avoir rendu service à plusieurs personnes.

 

Cordialement, Yorah42

4 REPLIES 4
speedramps
Super User
Super User

Hi @Yorah42  and @v-venuppu 

 

Please can @Yorah42 acceptr my solution rather than @v-venuppu  who has not provided a solution.

 

Frankly, I am getting annoyed with the "v-" accounts who keep asking "Please consider the post created by you as Accept as solution" when they have not posted any solution themselves, ion the hope that they will get the points,

 

 

v-venuppu
Community Support
Community Support

Hi @Yorah42 ,

Please post your solution in the community and accept your answer as solution. This will help the other members find it more quickly.

 

Thank you!!

v-venuppu
Community Support
Community Support

Hi @Yorah42 ,

Thank you for reaching out to Microsoft Fabric Community.

Thank you @speedramps for the prompt response.

Thank you so much for sharing this, This kind of post is incredibly valuable to the community. Definitely consider turning this into a blog post so others can benefit from your experience more easily

Power BI Community Blog - Microsoft Fabric Community

 

Please consider the post created by you as Accept as solution to help the other members find it more quickly.

Thank you.

 

 

speedramps
Super User
Super User

A DATE/TIME can only have 24 hours.

If the duration is 23 hours then the  DATE/TIME = 23 hours
If the duration is 25 hours then the  DATE/TIME = 1 hour !
If the duration is 23 hours then the  DATE/TIME = 3 hours !

Use an integer data type.   

Do not use a date/time data type.

 

Hours duration =
DATEDIFF[Start time][Stop time]), HOUR)
 

 

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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