Forum Discussion
Pagination in table visual
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.
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
- a46 years agoHelper III
I can't replace ALL with ALLSELECTED because i have to rank based on the filters in my report.Please find attatched the screenshot for the same.
- v-gizhi-msft6 years agoCommunity Support
Hi,
According your [New Rank] measure, please try to make a small change to it:
New Rank = ([Parameter Value]-1) * 5 + [rank]
Here is my original rank and changed rank:
Please use the [New Rank] to replace the original [rank] to display.
If you still have questions about this, please for free to let me know.
Best Regards,
Giotto Zhi
- a46 years agoHelper III
Hi Giotto
Thanks for the solution.It's working fine but as soon as I change the page no. to 2... and so on tyhe filters(slicer) are not working.Please find the screenshot for the same.
Kindly request you to reply as soon as possible
- v-gizhi-msft6 years agoCommunity Support
Hi,
Please create a new rank measure instead of directly adding ([Parameter Value]-1)*5 to your original rank.
Best Regards,
Giotto Zhi
- a46 years agoHelper III
Hi Giotto
Please ignore my latest reply, I was able to filter out records based on the Country when I am on third page, but the problem is I want my page slicer to adjust the page number according to the number of records.
Suppose after filtering on the basis of country or any other filter the total number of records are 100, then only two pages should be displayed in page slicer(50 RECORDS per page). Please find the screenshot for better understanding.
In the above screenshot after filtering the above records on the basis of country the page number should be reduced to two because there are only 51 records which are having France as their country and also after applying the filter the page no. should be automatically updated to one follwed two and so on depinding on the number of records(50 records per page).
Please reply as soon as possible.
Kind Regards
Amit Kumar
- v-gizhi-msft6 years agoCommunity Support
Hi,
I add some new data to my original test table:
Please create a new measure:
IsVisible = IF([Parameter Value]<COUNTROWS('Table')/5+1,1,-1)Then add it to this visual filter:
Then i test it, when i choose one country, it shows:
If my reply has answered your question, do not remember to mark my reply as a solution.
Best Regards,
Giotto Zhi
- a46 years agoHelper III
Hi Giotto
IsVisible = IF([Parameter Value]<COUNTROWS('Table')/50+1,1,-1) doesn't work for me.Please find below the series of dax which I have used untill now:
1.Parameter = GENERATESERIES(1, INT(760/50)+1, 1)(for generating the series,I have used a constant number 760)2.Parameter Value = SELECTEDVALUE('Parameter'[Page no.])3.FilterMeasue = IF([New Rank]>=([Parameter Value]-1)*50+1 && [New Rank]<= [Parameter Value]*50,1,-1) (this is applied on visual level filter)New Rank(Latest) = ([Parameter Value]-1) * 50 + [New Rank] (New rank measure)Please go through my previous reply for problem scenario.Kindly reply as soon as possible.Kind RegardsAmit Kumar - clinton25284 years agoNew Member
How did you handle a web data source with a API that Paginates. It only brings back a limit of about 200 records. I have more records that needs to be retrieved from the API.