Forum Discussion

Dicken's avatar
Dicken
Post Prodigy
1 year ago
Solved

Stop nesting in Matrix visual


Hi, can someone tell if   / how I can  stop nesting of month within year of a matrix ; 
 my calendar is ; 

CalTable =
VAR mindate = MIN(Table1[Date])
VAR maxdate = MAX(Table1[Date])
RETURN
ADDCOLUMNS(
CALENDAR( mindate, maxdate )  ,
"Year", YEAR([Date]) ,
"Sort", MONTH([Date]) ,
"Month", FORMAT([Date],"MMM")

I am not using the auto created hierarchy just year and month in the rows. 

Richard 
  • The best I've come up with is to go to layout  style minimal , layout tablular then 
    go to rows and toggle off the expand colapse . 

7 Replies

  • Hi Dicken ,

     

    If you are referring to the nesting like shown below, you can change the layout style to Tabular format by following these steps:

    Best regards,

     

    • Dicken's avatar
      Dicken
      Post Prodigy

      Yes thats what I did and then toggle off the expand colapse. 

  • Dicken's avatar
    Dicken
    Post Prodigy

    The best I've come up with is to go to layout  style minimal , layout tablular then 
    go to rows and toggle off the expand colapse . 

      • Dicken's avatar
        Dicken
        Post Prodigy

        Thanks for the response I was not wanitn to create a y / m column but thanks for the suggeston. 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Dicken ,

      Thank you for sharing your solution with us, we're glad to see that you solved your problem! Please don't forget to accept your reply as solution to help more others facing the same problem to find a solution quickly, thank you very much!

      Best Regards,
      Dino Tao

  • Hi Dicken ,

    You would create a new column for the Month and Year together, like so:

    CalTable =
    VAR mindate = MIN(Table1[Date])
    VAR maxdate = MAX(Table1[Date])
    RETURN
    ADDCOLUMNS(
    CALENDAR( mindate, maxdate )  ,
    "Year", YEAR([Date]) ,
    "Sort", MONTH([Date]) ,
    "Month", FORMAT([Date],"MMM"),
    "Period", FORMAT([Date], "MMM YYYY"),
    "YearMonthInt", VALUE(FORMAT([Date], "YYYYMM"))
    ) 

     

    Use the period column instead and of course sort it by the Year Month Int column.