Forum Discussion

leongramm99's avatar
leongramm99
Frequent Visitor
3 years ago
Solved

Asymmetric Matrix Table in PowerBI

Hi guys!    I have this Matrix table, with custom calculations for growth rate YoY and a CAGR calculation. I'd like to only show these values for the year 2022 and 2023, is there a way how this can...
  • BiNavPete's avatar
    BiNavPete
    3 years ago

    Hi leongramm99 

    Apologies, it wasn't clear form your first post what you wanted to see.
    See fresh PBIX here.

    The approach here is a little different because you don't have a dimension table with the growth columns.
    So you have to use a disconnected table and then write a measure (in the example {Header Measure]) to manage what to do with each header in the disconnected table. This is done with a simple SWITCH statement.

    The example assumes you want % growth amounts. This adds a formatting complication because you need % on the last two columns. So the measure is dynamically formatted in the ribbon with the functionality introduced here.

    The example PBIX hard codes the year. But it may be possible to build the header table in PQ using data form the sales table and adjust the DAX with variables.

    Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Happy to help!!

    Pete
    Web: https://binavigation.com
    Linked In: https://www.linkedin.com/in/pete-smith-955b73181