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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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