Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have a table with a large number of stocks/shares and a line chart based off of this showing the % holding of each stock over time. The issue (which to me is a non-issue!) is that when the PowerBI loads, as no stock is selected in the table, the line chart then shows all stocks and is a complete mess with hundres of lines all different colours, the fix of course, is the user just clicks a stock in the table and its sorted but they dont want to do that! They want it to default to the top stock in the list on openeing, with the ability to click on others stocks to show those holding when they use the report. Any ideas? 🙂
Solved! Go to Solution.
Hi,
Thanks for the solution Selva-Salimi offered, and i want to offer some more information for user to refet to.
hello @Craigja123 , you can use the pre-selected slicer visual, you can refer to the following sample.
Sample data
1.Create a true/false table.
2.Add the pre-selected slicer.
3.Create a rank measure first.
Rank = RANKX(ALLSELECTED('Table'[Type]),CALCULATE(SUM('Table'[value])),,DESC)
4.Create a preselect measure.
Preselect = IF([Rank]=1,TRUE(),FALSE())
5.Put the following field to the preselected visual.
Then it will preselect the top1 type.
Output
If you want to display all, you can select all.
If you want to display only top1, you just need to reset the slicer.
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Perfect! I couldnt work out how to get the pre selected slicer to work
Hi,
Thanks for the solution Selva-Salimi offered, and i want to offer some more information for user to refet to.
hello @Craigja123 , you can use the pre-selected slicer visual, you can refer to the following sample.
Sample data
1.Create a true/false table.
2.Add the pre-selected slicer.
3.Create a rank measure first.
Rank = RANKX(ALLSELECTED('Table'[Type]),CALCULATE(SUM('Table'[value])),,DESC)
4.Create a preselect measure.
Preselect = IF([Rank]=1,TRUE(),FALSE())
5.Put the following field to the preselected visual.
Then it will preselect the top1 type.
Output
If you want to display all, you can select all.
If you want to display only top1, you just need to reset the slicer.
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Craigja123
you can save and upload your dashboard on the first ranked stock selection so when the end user open the dashboard they always see one stock and can select any stock they prefer.
as the first stock might be dynamically changed. then write a measure using "Rankx" to find top 1.
If this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.
Another easy solution is to create a column and rank your stock based on the value as follows:
ranked_column = RANKX('your_Table','your_Table'[value],,DESC)
and then create another table which contain just number "1" and relate these two tables to each other and create an slicer in the dashboard. when end user select the slicer they can see first ranked stock (default setting) and when unselected they can see all.
If this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.