Forum Discussion
Mawriz
4 years agoFrequent Visitor
Split Half Years Into Quarters
Hi, I am a biginner user of Power BI and I am not even sure if this is the right place to ask this question. But the problem is as shown in the photo. The data is in half years (ofcour...
v-yingjl
4 years agoCommunity Support
Hi Mawriz ,
The new Date column's logic is like @ Mawriz mentioned to create:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCinNS80xMFLSUTIyMDLWN9c3BDJNDAwMlGJjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Rate = _t, Date = _t, Tons = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Rate", type text}, {"Date", type date}, {"Tons", Int64.Type}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "New Date", each {Date.AddMonths([Date], -3), [Date]}),
#"Expanded New Date" = Table.ExpandListColumn(#"Added Custom", "New Date"),
#"Removed Columns" = Table.RemoveColumns(#"Expanded New Date",{"Date"}),
#"Changed Type1" = Table.TransformColumnTypes(#"Removed Columns",{{"New Date", type date}})
in
#"Changed Type1"
But still not certain the logic that you want to calculate 44.44 and 43.95.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.