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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Lana012021
Frequent Visitor

Minimizing matrix table

Hi

I have matrix table there shows open task by owner and priority, but table going to be quite large, infect there are only showing one task per line.

Lana012021_0-1702993826941.png

To try to minimize the table, I manual has added a new column with an index number. Ex. LES have 5 Task in Priority 3, and therefor Task 6 get 1, Task 7 get 2 … and Task 14 get 5. See the table:

Lana012021_1-1702993862431.png

I have done that for all task then the matrix table look like this:

Lana012021_2-1702993918399.png

But how do I do this automatic with DAX, so I don’t have do the "Id number" manual?

 

Best regard Lars

1 ACCEPTED SOLUTION
barritown
Solution Sage
Solution Sage

Hi @Lana012021,

If you add an index column so each task has a unique numeric ID, you can use such a calculated column:

barritown_0-1703075926894.png

Here's the code in plain text:

ID number = 
VAR cOwner = [Owner]
VAR cPriority = [Priority]
VAR cTaskID = [Task ID]
RETURN COUNTROWS ( FILTER ( Data, [Owner] = cOwner && [Priority] = cPriority && [Task ID] <= cTaskID ) )

In your mocking case, the Task ID column can be created like that:

Task ID = INT ( SUBSTITUTE ( [Task name], "Task", "" ) )

Best Regards,

Alexander

My YouTube vlog in English

My YouTube vlog in Russian

 

 

 

View solution in original post

2 REPLIES 2
barritown
Solution Sage
Solution Sage

Hi @Lana012021,

If you add an index column so each task has a unique numeric ID, you can use such a calculated column:

barritown_0-1703075926894.png

Here's the code in plain text:

ID number = 
VAR cOwner = [Owner]
VAR cPriority = [Priority]
VAR cTaskID = [Task ID]
RETURN COUNTROWS ( FILTER ( Data, [Owner] = cOwner && [Priority] = cPriority && [Task ID] <= cTaskID ) )

In your mocking case, the Task ID column can be created like that:

Task ID = INT ( SUBSTITUTE ( [Task name], "Task", "" ) )

Best Regards,

Alexander

My YouTube vlog in English

My YouTube vlog in Russian

 

 

 

Thank you very much it was really helpfull!

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.