Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I would like to ask for help because I have a report that I am migrating from excel to power bi.
In it I have 2 different dates, one for main and one for activation.
For main I use 2 columns with start and end date, but when it comes to activation I use two other start and end dates.
I tried to reproduce my excel formula and it didn't work very well.
Are there any good tips?
Formula I use in excel: =IF(T5="Activation",INT(Q5-P5)&" days"&TEXT(Q5-P5,"h"" hrs ""m"" mins """),INT(L5-K5)&" days"&TEXT(L5-K5,"h"" hrs ""m"" mins """))
Solved! Go to Solution.
Hi @FelippeAzevedo7 ,
Just change the TEXT in your formula to FORMAT, such as:
=IF(T5="Activation",INT(Q5-P5)&" days"&FORMAT(Q5-P5,"h"" hrs ""m"" mins """),INT(L5-K5)&" days"&FORMAT(L5-K5,"h"" hrs ""m"" mins """))
Note: Cell references such as T5 and Q5 need to be changed to the corresponding columns.
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
Hi @FelippeAzevedo7 ,
Just change the TEXT in your formula to FORMAT, such as:
=IF(T5="Activation",INT(Q5-P5)&" days"&FORMAT(Q5-P5,"h"" hrs ""m"" mins """),INT(L5-K5)&" days"&FORMAT(L5-K5,"h"" hrs ""m"" mins """))
Note: Cell references such as T5 and Q5 need to be changed to the corresponding columns.
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
Hello
Could you check if the formula is correct?
If Table[Date] is a date containing a time, e.g. 2024-1-1 13:45, then Table[Date]. [Date] then always returns the date part, i.e. 2024-1-1, so that the hours and minutes in the result are 0.
I'm guessing it's due to this
Hello again
Many tks for the information. It worked perfectly!
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
11 | |
9 | |
6 |