Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Dear all,
My goal is to implement dynamic serial numbers for rows in a Matrix Visual.
My input data is „Data Table“ with these columns:
Name | Parent | Employee | Influencer |
John | YES | YES | YES |
Peter | YES | NO | NO |
Mary | NO | YES | NO |
Luke | NO | NO | YES |
Since with the matrix visual I wanted to show only persons who are parents AND/OR influencers, I have created conditional column „Parent and/or Influencer“ using this conditions:
If „Parent“ equals „YES“ then „YES“,
Else if „Influencer“ equals „YES“ then „YES“,
Else „NO“.
In the visual filter I have used the „Parent and/or Influence“ with value „YES“, and the results are:
Name | Parent | Influencer |
John | YES | YES |
Peter | YES | NO |
Luke | NO | YES |
Now I am struggling with for example RANKX and ALLSELECT functions in order to get serial numbers in my visual. The outcome which I would like to have is this:
Serial No. | Name | Parent | Influencer |
1 | John | YES | YES |
2 | Peter | YES | NO |
3 | Luke | NO | YES |
What I want is to make it dynamic. Next time I refresh data for upcoming quarter, I want the serial numbers to fit properly.
I appreciate your help.
@Let-Me-Know , Try the new rownumber function released in April 2023
example
New Row Number = ROWNUMBER(ALLSELECTED(Table[Name]),ORDERBY(Table[Name],asc))
Or, what would be a solution with COUNT and OR functions, aka Excel way to count:
COUNT how many people are a parent OR an influencer?
In my example, there are three of them.
I would then put that number in another table visual.
Hi, @amitchandak
Thnx for the hint.
You gave an example:
New Row Number = ROWNUMBER(ALLSELECTED(Table[Name]),ORDERBY(Table[Name],asc))
But how would it look like if you had implemented my table and column titles? Would it look like this?
ROWNUMBER = ROWNUMBER(ALLSELECTED(Data Table),ORDERBY(Data Table[Parent and/or Influence],asc))
I have tried that but it does not work. After I add that measure as a column in my table, I get the message
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 27 | |
| 24 | |
| 18 | |
| 15 | |
| 15 |
| User | Count |
|---|---|
| 63 | |
| 42 | |
| 41 | |
| 39 | |
| 37 |