Forum Discussion
Date format
- 6 years ago
o59393 ,
You have to go to Transform Data/Edit Query and use the Custom Column option.
In Dax , you can try like
format(DATEVALUE("Apr 01 2019"),"MMMM-YYYY")If it a static value you can use in measure too. Else in measure use some aggregation.
Perhaps:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WciwoUjAwVDAyMLRUitWJVvJKzIPwjQzAfLfUJAUDYwTfqzRHwdAUyo8FAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
#"Added Custom Column" = Table.AddColumn(Source, "Custom", each Text.Combine({Date.ToText(Date.From([Column1]), "MMMM"), " ", Date.ToText(Date.From([Column1]), "yyyy")}), type text)
in
#"Added Custom Column"
Hi
Where do I have to paste that?
As an added custom column?
Thanks!
- amitchandak6 years agoSuper User
o59393 ,
You have to go to Transform Data/Edit Query and use the Custom Column option.
In Dax , you can try like
format(DATEVALUE("Apr 01 2019"),"MMMM-YYYY")If it a static value you can use in measure too. Else in measure use some aggregation.
- Greg_Deckler6 years agoCommunity Champion
That was the code behind the query. You would create a blank query and then paste that code into Advanced Editor. I think I created that code using Add Column From Examples.
- zoupie6 years agoNew Member
sorry new to this formula builder. I am trying yearmonth. not working
yearmonth = FORMAT('vw_datamart_Activities'[dt_start],"YYYYMM")
This is more of the downsteam table
feel free to adjust our dashboard. AppWorx_Azure