Forum Discussion

randomUser21's avatar
randomUser21
Icon for Resolver I rankResolver I
1 year ago
Solved

Exporting Sales Details from Power BI matrix

hello everyone,

 

I am currently working on a Power BI report that includes a matrix displaying sales targets from the "Objectives"
table alongside actual sales data from the "Sales" table, which includes metrics like revenue and margin.

 

I would like to eexport of underlying data sales data, but when I attempt to export the underlying data, I only receive the details from the "Objectives" table.


My goal is to export just the sales details without the additional information from the "Objectives" table.

Does anyone have suggestions on how I can achieve this?

 

Thank you in advance for your help!

Best regards,

  • randomUser21's avatar
    randomUser21
    1 year ago

    DataNinja777 I'm not sure I understood, it doesn't solve my problem because I need to display the objective for each shop in the matrix, even if in the export I only need sales. And currently in the export I only have the objectives

    Matrix :

    shopObjectivessalesmargin
    shop 110 00012 525$4 509$
    shop 220 00018 645$6 048$
    shop 315 0006 298$1 248$
    shop 45 0001 985$750$

     

    for example I want to export for shop 4 :

     

    sale id dateid_shopprice customer idmargin
    5457801/08/202541501250
    1545501/08/20254800170320
    5457803/08/20254540320180
    5457807/08/2025449574200
  • DataNinja777's avatar
    DataNinja777
    1 year ago

    Hi randomUser21 ,

     

    In Power BI, when you use a matrix visual that includes fields from both the "Objectives" table and the "Sales" table, exporting underlying data will only return data from one table—typically the one used in row headers or most prominently in the visual structure. This is why you're getting only the objectives in your export. To export detailed sales data such as sale ID, date, price, and margin while still showing objectives in your report, the best approach is to separate the visuals.

    Keep your current matrix for display, but create a new table visual that includes only fields from the "Sales" table. This visual can be filtered by the shop selected in the matrix, either by using a slicer or by enabling interactions. Use the following fields from the "Sales" table in the table visual: Sale ID, Date, Shop ID, Price, Customer ID, and Margin.

    Here’s an example of how you might define the exportable visual using a calculated table in DAX if you prefer a dedicated table:

    Export_SalesOnly = 
    SELECTCOLUMNS(
        Sales,
        "Sale ID", Sales[Sale ID],
        "Date", Sales[Date],
        "Shop ID", Sales[Shop ID],
        "Price", Sales[Price],
        "Customer ID", Sales[Customer ID],
        "Margin", Sales[Margin]
    )
    

    Then build a separate table visual from this Export_SalesOnly table. When users filter by a specific shop using a slicer or by selecting a shop in the matrix, the table visual will display only the relevant sales records, and exporting the underlying data from this visual will yield the detailed sales rows you need, without including fields from the "Objectives" table.

     

    Best regards,

6 Replies

  • Hi randomUser21 ,

     

    When exporting underlying data from a matrix in Power BI, the export will only include fields from a single table if all fields used in the visual come from that table or have clear model relationships. In your case, because your matrix includes data from both the "Objectives" table and the "Sales" table, Power BI may default to exporting only from the "Objectives" table, especially if it’s used in the row or column headers.

    To export only the sales details, you can create a new table visual that includes only fields from the "Sales" table, such as customer name, date, revenue, and margin. Avoid using fields from the "Objectives" table in this new visual. Then, when you export the underlying data from this table, Power BI will provide the raw sales records as expected.

    If you need a dedicated exportable version, you can also create a calculated table using DAX that contains only sales information. For example:

    Export_SalesOnly = 
    SELECTCOLUMNS(
        Sales,
        "Customer", Sales[Customer],
        "Date", Sales[Date],
        "Revenue", Sales[Revenue],
        "Margin", Sales[Margin]
    )
    

    Then, build a new table visual from this calculated table and export the underlying data from there. Make sure no unrelated filters or row-level security settings interfere with the visibility of the sales records. This approach should allow you to export just the sales data without any additional information from the "Objectives" table.

     

    Best regards,

    • randomUser21's avatar
      randomUser21
      Icon for Resolver I rankResolver I

      DataNinja777 I'm not sure I understood, it doesn't solve my problem because I need to display the objective for each shop in the matrix, even if in the export I only need sales. And currently in the export I only have the objectives

      Matrix :

      shopObjectivessalesmargin
      shop 110 00012 525$4 509$
      shop 220 00018 645$6 048$
      shop 315 0006 298$1 248$
      shop 45 0001 985$750$

       

      for example I want to export for shop 4 :

       

      sale id dateid_shopprice customer idmargin
      5457801/08/202541501250
      1545501/08/20254800170320
      5457803/08/20254540320180
      5457807/08/2025449574200
      • DataNinja777's avatar
        DataNinja777
        Icon for Super User rankSuper User

        Hi randomUser21 ,

         

        In Power BI, when you use a matrix visual that includes fields from both the "Objectives" table and the "Sales" table, exporting underlying data will only return data from one table—typically the one used in row headers or most prominently in the visual structure. This is why you're getting only the objectives in your export. To export detailed sales data such as sale ID, date, price, and margin while still showing objectives in your report, the best approach is to separate the visuals.

        Keep your current matrix for display, but create a new table visual that includes only fields from the "Sales" table. This visual can be filtered by the shop selected in the matrix, either by using a slicer or by enabling interactions. Use the following fields from the "Sales" table in the table visual: Sale ID, Date, Shop ID, Price, Customer ID, and Margin.

        Here’s an example of how you might define the exportable visual using a calculated table in DAX if you prefer a dedicated table:

        Export_SalesOnly = 
        SELECTCOLUMNS(
            Sales,
            "Sale ID", Sales[Sale ID],
            "Date", Sales[Date],
            "Shop ID", Sales[Shop ID],
            "Price", Sales[Price],
            "Customer ID", Sales[Customer ID],
            "Margin", Sales[Margin]
        )
        

        Then build a separate table visual from this Export_SalesOnly table. When users filter by a specific shop using a slicer or by selecting a shop in the matrix, the table visual will display only the relevant sales records, and exporting the underlying data from this visual will yield the detailed sales rows you need, without including fields from the "Objectives" table.

         

        Best regards,

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi randomUser21 ,

    Just checking in to see if you query is resolved and if any responses were helpful. If so, kindly consider marking the helpful reply as 'Accepted Solution' to help others with similar queries. 

    Otherwise, feel free to reach out for further assistance.

    Thank you.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi randomUser21 ,

    Following up to see if your query has been resolved. If any of the responses helped, please consider marking the relevant reply as the 'Accepted Solution' to assist others with similar questions.

    If you're still facing issues, feel free to reach out.

    Thank you.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi randomUser21 

    We’re following up once more regarding your query. If it has been resolved, please mark the helpful reply as the Accepted Solution to assist others facing similar challenges.

    If you still need assistance, please let us know.
    Thank you.