Forum Discussion
Pagination in table visual
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
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
- a46 years ago
Helper III
Please guide me to generate the parameter as I don't have any ID field in my dataset.I did apply a logic by taking a constant number (747) as the last value to generate my series but as soon as change my page the rank again starts from1.
Please find attatched the screnshot for the same.
- v-gizhi-msft6 years ago
Community Support
Hi,
For your problem, I think it is related to ‘ALL’ and ‘ALLSELECTED’ in your rank measure.
Here is my original rank measure:
rank = RANKX(ALL('Table'),CALCULATE(SUM('Table'[sales])),,DESC)
And the result shows:
Now I try to change this rank measure to this:
rank = RANKX(ALLSELECTED('Table'),CALCULATE(SUM('Table'[sales])),,DESC)
And the result shows:
It should be noticed that the first page is normal but the second page’s rank field is incorrect.
The wrong result is just like the image shows you provided.
Please check your rank measure whether using ‘ALLSELECTED’, if so, try to change it to ‘ALL’.
If you still have questions about this, please for free to let me know.
Best Regards,
Giotto Zhi