Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Power BI

Status
Not open for further replies.

Cpreston

MIS
Mar 4, 2015
972
GB
Hi

Does anyone know if there is a forum for Power BI Desktop I have a couple of questions that I could do with some help with

1. How do you sum Time fields hh:mm:ss
2. How do I concatenate a text field and a date field together. I know where to join 2 columns but I cannot get the syntax correct.

This is probably not the right Forum but if someone could point me to the right place please.

Thanks in advance
 
Hi,

1. How do you sum Time fields hh:mm:ss

You would only sum Time fields if at least one of them were a Time Duration field. You simply sum them and then FORMAT the result to suite your needs as you would any Date/Time value.
FAQ68-5827

2. How do I concatenate a text field and a date field

Since Date/Time values are numbers, you must convert your Date/Time value FORMAT using the TEXT() function as...
[tt]
=TextFieldRef&TEXT(Date/TimeRef,"yyyy/mm/dd")
[/tt]


Skip,

[glasses]Just traded in my OLD subtlety...
for a NUance![tongue]

"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein
 
Power Query part of Power BI (actually the advanced editor code from excel), starting with tData query querying excel table, with two columns ('txt' and 'date'):

[pre]let
Source = tData,
FormatTextDateColumn = Table.TransformColumns(Source,{{"date", each Date.ToText(Date.From(_),"yyyyMMdd") , type text}}),
#"Merged Columns" = Table.CombineColumns(FormatTextDateColumn,{"txt", "date"},Combiner.CombineTextByDelimiter(" ", QuoteStyle.None),"MergedColumn")
in
#"Merged Columns"[/pre]

Most of the code are recorded steps.

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top