cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
nikhily-optimus
Frequent Visitor

How to set slicer value to first available value form table?

I have an automated process for publishing reports using Power BI Api's. But when they get published the value selected in slicer is what it was in the previous reports which is completely irrelevant to the new data source. Is there a way to get a relevant selection in the slicer according to the new data automatically whenever the the reports with new data source is published?

3 REPLIES 3
Super User III
Super User III

Re: How to set slicer value to first available value form table?

@nikhily-optimus When the original file is saved, it is saved with whatever values were set in both filters and slicers. I would suggest updating the source report to remove that original value... Or is there a need to have the first value selected regardless of data?


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG
nikhily-optimus
Frequent Visitor

Re: How to set slicer value to first available value form table?

I have 100 clients and when i replicate reports for them using Power BI API's the slicer is selected to first client product name. Right now I have to make all the changes manually before delivering the reports is there any workaround for this??

Sakshi Helper I
Helper I

Re: How to set slicer value to first available value form table?

@Seth_C_Bauer There is a need to default the slicer based on the data available in the data source.

 

Let me just clarify the requirement.  Let's say there is a Product slicer with the single select option enabled, and while publishing the report we have set the default value to Product X. Within the source, we have updated the name of that particular product to Product XY.

So, now, our report will display two values in the Product slicer. 

  • Product X (default selection but not available in the database) 
  • Product XY

Kindly note that we are using Direct Query as the connection mode. 

 

I hope the issue is clear now, let me know if there is a solution or workaround to resolve this issue. I will be happy to share further details if required.

 

Any help will be highly appreciated.

 

Thanks,

Sakshi

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications