cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NehaMarwaha
Regular Visitor

Combining data and quarter in a column in the form of heirarchy

Hi,

 

Can anyone please help me in creating a date column in the below format:

 

Capture.PNGQuarter and month in a heirarchy

 
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User I
Super User I

Re: Combining data and quarter in a column in the form of heirarchy

Hello @NehaMarwaha 

 

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:

grafik.png

 

you can also create a new table in power BI using this syntax

grafik.png

 

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

View solution in original post

4 REPLIES 4
Super User I
Super User I

Re: Combining data and quarter in a column in the form of heirarchy

Hello @NehaMarwaha 

 

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

grafik.png

 

Delete year and day and show the complete hierarchy. This is the outcome

grafik.png

If this post helps or solves your problem, please mark it as solution.
Kudos are nice to - thanks
Have fun

Jimmy

NehaMarwaha
Regular Visitor

Re: Combining data and quarter in a column in the form of heirarchy

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

Highlighted
Super User I
Super User I

Re: Combining data and quarter in a column in the form of heirarchy

Hello @NehaMarwaha 

 

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:

grafik.png

 

you can also create a new table in power BI using this syntax

grafik.png

 

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

View solution in original post

Super User I
Super User I

Re: Combining data and quarter in a column in the form of heirarchy

Hello @NehaMarwaha 

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

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors