Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello,
I have a integer column, which is hours in decimal. I just watn to add a "h" for hours.
I know there is a possiblity to do something like
Measure= containsstring(calculate(sum(Workinghours)), "h")
but this way I have convert the return of that measure into a string, which I cannot put in another calculation. Other than that the big disadvantage is that if I want to make color formatting the colors only applys to the sum of workinghours, but not to the string "h".
So my first question is, if its possible to do it without a measure in the first place, just format it in the "format" field in a certain way.
Or if not how to write better code to get there?
Thank you very much in advance.
Best.
Solved! Go to Solution.
Hi @Applicable88 ,
To my knowledge, currently there is no way to add a string to the Time type and still maintain the Time type.
In your case, I suggest you add an another measure to add a "h" text to the original measure. Like this:
sum Workinghours = CALCULATE(SUM('Table'[Workinghours]),ALLEXCEPT('Table','Table'[ID]))
Add H to measure = [sum Workinghours] & "h"
Then you could onditional formatting as well:
An idea similar with what you expect has been submitted in the following link, please vote it up and you can add comments in this idea: Time format [hh]:mm:ss
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Applicable88 ,
To my knowledge, currently there is no way to add a string to the Time type and still maintain the Time type.
In your case, I suggest you add an another measure to add a "h" text to the original measure. Like this:
sum Workinghours = CALCULATE(SUM('Table'[Workinghours]),ALLEXCEPT('Table','Table'[ID]))
Add H to measure = [sum Workinghours] & "h"
Then you could onditional formatting as well:
An idea similar with what you expect has been submitted in the following link, please vote it up and you can add comments in this idea: Time format [hh]:mm:ss
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
96 | |
69 | |
45 | |
39 | |
30 |
User | Count |
---|---|
155 | |
96 | |
60 | |
42 | |
41 |