Forum Discussion
Pagination in table visual
hi,
According to your description, please continue to use table visual and create a measure to show its pagination effect.
Here is my test table:
I have six rows and it try to show them with five rows per page.
Please follow these steps:
1)Create a new column and a measure:
Parameter = GENERATESERIES(1, INT(MAX('Table'[ID])/5)+1, 1)
Parameter Value = SELECTEDVALUE('Parameter'[Parameter])
2)Create a measure to paginate the table:
FilterMeasue = IF(VALUE(SELECTEDVALUE('Table'[ID]))>=([Parameter Value]-1)*5+1 && VALUE(SELECTEDVALUE('Table'[ID]))<= [Parameter Value]*5,1,-1)
And then add it to filters:
3)Create a slicer by using the column above:
4)And the result shows:
Here is my pbix test file.
If you still have questions about this, please for free to let me know.
Best Regards,
Giotto Zhi
My Table structure is different from yours. I have a rank measure and I want to show first 50 ranks on the first page and so on.
- v-gizhi-msft6 years ago
Community Support
Hi,
According to your requirement, I create a rank measure to test:
rank = RANKX(ALL('Table'),CALCULATE(SUM('Table'[sales])),,DESC)
Please change the original measure ‘FilterMeasure’ to this:
FilterMeasue = IF([rank]>=([Parameter Value]-1)*5+1 && [rank]<= [Parameter Value]*5,1,-1)
The following steps is the same with my second reply, and the result shows:
Here is my pbix test file:
If you still have questions about this, please for free to let me know.
Best Regards,
Giotto Zhi
- a46 years ago
Helper III
I don't have any ID field upon which I can write the parameter logic. Is there any way to write the parameter logic on rank.Kindly request you to reply as soon as possible
- v-gizhi-msft6 years ago
Community Support
Hi,
Please change the table [parameter] to this:
Parameter = GENERATESERIES(1, INT(MAXX('Table',[rank])/5)+1, 1)And then if you remove [ID] column, it will still work because I have changed the original ‘FilterMeasure’:
Original:
FilterMeasue = IF(VALUE(SELECTEDVALUE(Table[ID]))>=([Parameter Value]-1)*5+1 && VALUE(SELECTEDVALUE(Table[ID]))<= [Parameter Value]*5,1,-1)
New:
FilterMeasue = IF([rank]>=([Parameter Value]-1)*5+1 && [rank]<= [Parameter Value]*5,1,-1)
The new measure depends on measure [rank] instead of column [ID], and the measure [rank] is not related to column [ID].
So removing column [ID] has no effect, and the result shows:
If you still have questions about this, please for free to let me know.
Best Regards,
Giotto Zhi