Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
VijayVignesh_V
Frequent Visitor

How to display distinct values from a dataset column in a PBI Matrix visual?

I have dataset of 15 million records in which there is a column called Issue had the types of issue. There are close to 200 unique calues in that column. When i drag that column to a matrix visual, it keeps loading and loading due to the volume of data and finally fails. 

 

How should i show only the 200 distinct values in the matrix so that i can do some calculations based on the each Issue category? 

2 REPLIES 2
MAwwad
Super User
Super User

To display distinct values from a dataset column in a Power BI matrix visual, you can create a new table that contains only the distinct values from the "Issue" column, and then use that table as the source for the matrix visual.

Here's how you can do it:

  1. In Power BI Desktop, go to the "Modeling" tab and select "New Table" from the "Tables" group.

  2. In the formula bar, type the following DAX formula to create a new table with the distinct values from the "Issue" column:

    scssCopy code
    IssueTable = DISTINCT('YourTableName'[Issue])

    Replace "YourTableName" with the name of the table that contains the "Issue" column.

  3. Press "Enter" to create the new table.

  4. Now, drag the "Issue" column from the "IssueTable" to the "Rows" field of the matrix visual.

  5. You can then add any measures that you want to calculate based on the Issue category to the "Values" field of the matrix visual.

By using a separate table with only the distinct values from the "Issue" column, you can avoid the performance issues that can arise when trying to display all 15 million records in the matrix visual. The matrix will only display the distinct values, and you can still perform calculations based on each Issue category.

Hi @MAwwad , Thank you so much responding to my question.

The same thing what you told i tried earlier in a different way. Created a blank query and applied the below steps.

let
Source = List.Distinct(Dataset[ISSUE_NAME]),
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "ISSUE_NAME"}})
in
#"Renamed Columns"

As expected, a table with the distinct values were created. But when i add them in Rows of matrix, and put the measure in Values, the measure value was same for all the Issue categories. Then i created a relationship between the created column and the existing column in the dataset. After that, the matrix visual throws an error saying "Can't display the visual. See Details".

 

The same thing happened here too when i typically tried the same steps suggested by you. Putting the screen shot of the error below.

VijayVignesh_V_0-1677776564907.png

 

Any of your help is appreciated. Thanks in advance.

Vijay

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.