Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 35 | |
| 34 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 136 | |
| 102 | |
| 68 | |
| 66 | |
| 58 |