Forum Discussion

jaswalsarthak's avatar
jaswalsarthak
Frequent Visitor
1 year ago
Solved

Display multiple set of value Matrix

Hi All, i want to display values as a set. I.E. after 1 set of value is displayed for months, then i want another set of value after that.

 

Currently for each month both the values are showing. Please see below for reference.

 

 Jan Feb 
Product Sales % ChangeSales % Change
a100200%300100%
b200400%500500%
c300800%700200%
d400400%400700%

 

I would like to have it shown in the below format. Please adivce Thanks

 

 JanFebJanFeb
Product Sales Sales % Change% Change
a100300200%100%
b200500400%500%
c300700800%200%
d400400400%700%
  • you can use a combination of measures and custom columns to rearrange your data. Here’s a step-by-step guide to help you set it up:


    Step 1: Create Measures for Sales and % Change
    First, ensure you have measures for Sales and % Change for each month. For example:

    Sales_Jan = CALCULATE(SUM(Sales[Amount]), Sales[Month] = "Jan")
    Sales_Feb = CALCULATE(SUM(Sales[Amount]), Sales[Month] = "Feb")
    Percent_Change_Jan = CALCULATE(SUM(Sales[Percent Change]), Sales[Month] = "Jan")
    Percent_Change_Feb = CALCULATE(SUM(Sales[Percent Change]), Sales[Month] = "Feb")


    Step 2: Create a Custom Table
    Create a custom table to hold the rearranged data. You can use the UNION function to combine the data in the desired format:

    CombinedTable =
    UNION(
    SELECTCOLUMNS(
    Sales,
    "Product", Sales[Product],
    "Jan", [Sales_Jan],
    "Feb", [Sales_Feb],
    "Jan % Change", BLANK(),
    "Feb % Change", BLANK()
    ),
    SELECTCOLUMNS(
    Sales,
    "Product", Sales[Product],
    "Jan", BLANK(),
    "Feb", BLANK(),
    "Jan % Change", [Percent_Change_Jan],
    "Feb % Change", [Percent_Change_Feb]
    )
    )


    Step 3: Create the Visual
    Add a Table Visual: Add a table visual to your report.
    Add Columns: Add the columns from the CombinedTable to the table visual in the order you want them to appear: Product, Jan, Feb, Jan % Change, Feb % Change.

    Step 4: Format the Table
    Adjust Column Widths: Adjust the column widths to ensure the data is displayed clearly.
    Apply Conditional Formatting: If needed, apply conditional formatting to highlight specific values or trends.
    Example Data Layout
    Your table should now look like this:

    Jan Feb Jan Feb
    Product Sales Sales % Change % Change
    a 100 300 200% 100%
    b 200 500 400% 500%
    c 300 700 800% 200%
    d 400 400 400% 700%

    Best Regards
    Saud Ansari
    If this post helps, please Accept it as a Solution to help other members find it. I appreciate your Kudos!

1 Reply

  • saud968's avatar
    saud968
    Memorable Member

    you can use a combination of measures and custom columns to rearrange your data. Here’s a step-by-step guide to help you set it up:


    Step 1: Create Measures for Sales and % Change
    First, ensure you have measures for Sales and % Change for each month. For example:

    Sales_Jan = CALCULATE(SUM(Sales[Amount]), Sales[Month] = "Jan")
    Sales_Feb = CALCULATE(SUM(Sales[Amount]), Sales[Month] = "Feb")
    Percent_Change_Jan = CALCULATE(SUM(Sales[Percent Change]), Sales[Month] = "Jan")
    Percent_Change_Feb = CALCULATE(SUM(Sales[Percent Change]), Sales[Month] = "Feb")


    Step 2: Create a Custom Table
    Create a custom table to hold the rearranged data. You can use the UNION function to combine the data in the desired format:

    CombinedTable =
    UNION(
    SELECTCOLUMNS(
    Sales,
    "Product", Sales[Product],
    "Jan", [Sales_Jan],
    "Feb", [Sales_Feb],
    "Jan % Change", BLANK(),
    "Feb % Change", BLANK()
    ),
    SELECTCOLUMNS(
    Sales,
    "Product", Sales[Product],
    "Jan", BLANK(),
    "Feb", BLANK(),
    "Jan % Change", [Percent_Change_Jan],
    "Feb % Change", [Percent_Change_Feb]
    )
    )


    Step 3: Create the Visual
    Add a Table Visual: Add a table visual to your report.
    Add Columns: Add the columns from the CombinedTable to the table visual in the order you want them to appear: Product, Jan, Feb, Jan % Change, Feb % Change.

    Step 4: Format the Table
    Adjust Column Widths: Adjust the column widths to ensure the data is displayed clearly.
    Apply Conditional Formatting: If needed, apply conditional formatting to highlight specific values or trends.
    Example Data Layout
    Your table should now look like this:

    Jan Feb Jan Feb
    Product Sales Sales % Change % Change
    a 100 300 200% 100%
    b 200 500 400% 500%
    c 300 700 800% 200%
    d 400 400 400% 700%

    Best Regards
    Saud Ansari
    If this post helps, please Accept it as a Solution to help other members find it. I appreciate your Kudos!