Forum Discussion
Create a depreciation analysis table
Hello,
This topic is a continuation of my 1st post here,
Thanks to the contributors, I realised that it wasn't possible to create a custom table directly in Power Pivot Excel, at least not in the way I thought.
So I created a calendar table in Power Query and loaded it into Power Pivot.
The M code for the calendar table isn't great, but it works
Now I'd like to continue to the end.
If I understand correctly, I need to create 2 measures to obtain the final result.
And I'm already getting stuck
Can you please help me to create these 2 measurements ?
Thanks in advance
Best regards
let
Source = {Number.From(#date(2020,1,1))..Number.From(#date(2022,12,31))},
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Changed Type" = Table.TransformColumnTypes(#"Converted to Table",{{"Column1", type date}}),
#"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"Column1", "Date"}}),
#"Added Custom Column" = Table.AddColumn(#"Renamed Columns", "Custom", each Text.Combine({Date.ToText([Date], "yyyy"), "0", Date.ToText([Date], "%M")}), type text),
#"Renamed Columns1" = Table.RenameColumns(#"Added Custom Column",{{"Custom", "YM"}})
in
#"Renamed Columns1"
2 Replies
- AnonymousNot applicable
Hi Mederic
What the result you want to get?
Please describe the issue you met in detailed, so that we can help you better.
And could you please provide the sample data(without sensitive data), or create some sample data.
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. - Mederic
Post Patron
Hello Anonymous ,
Sorry for the late reply, and thank you for your message.
In fact there was the whole description in the link in my 1st message. You're right, here's a Power Bi file with 2 tables and an image of what I'd like to reproduce. It's a statement that I found in this link.
I'm having trouble creating the MeasuresThanks in advance
Best regards