Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
Can anyone please help me in creating a date column in the below format:
Solved! Go to Solution.
Hello @Anonymous
this has nothing to to with M-language nor DAX. Its the visualisation that craetes the grouping in the data model without you to take any action. So the only important thing is that you in your datamadel somewhere have a row with a date, formated as a date, just like this:
you can also create a new table in power BI using this syntax
Copy paste this code to the advanced editor to see how the solution works
If this post helps or solves your problem, please mark it as solution.
Kudos are nice to - thanks
Have fun
Jimmy
Hello @Anonymous
this is a grouping that is craeted automatically when a column is placed as rows that is formated as date.
Try this
Copy this to a blank query
let
Quelle = List.Dates(#date(2019,1,1),600,#duration(1,0,0,0)),
CreateTable = Table.FromList(Quelle, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
Rename = Table.RenameColumns(CreateTable,{{"Column1", "Date"}}),
ChangeType = Table.TransformColumnTypes(Rename,{{"Date", type date}})
in
ChangeType
then go to the visuals an place the date-column in a matrix
the date is autmatically grouped like this
Delete year and day and show the complete hierarchy. This is the outcome
If this post helps or solves your problem, please mark it as solution.
Kudos are nice to - thanks
Have fun
Jimmy
Thanks. This solution worked, but i was looking to implement it through DAx functions instead of M-query.Can you please help with that
Thanks,
Neha Marwaha
Hello @Anonymous
were you able to solve the problem with any reply given?
If so, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
All the best
Jimmy
Hello @Anonymous
this has nothing to to with M-language nor DAX. Its the visualisation that craetes the grouping in the data model without you to take any action. So the only important thing is that you in your datamadel somewhere have a row with a date, formated as a date, just like this:
you can also create a new table in power BI using this syntax
Copy paste this code to the advanced editor to see how the solution works
If this post helps or solves your problem, please mark it as solution.
Kudos are nice to - thanks
Have fun
Jimmy
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.