# How to change index pattern used by visualization/widget in kibana dashboard in kibana 7.17.9?

**URL:** <https://discuss.elastic.co/t/how-to-change-index-pattern-used-by-visualization-widget-in-kibana-dashboard-in-kibana-7-17-9/347080>\
**Category:** Kibana\
**Tags:** visualisation\
**Created:** [November 14, 2023, 5:49am UTC](https://discuss.elastic.co/t/how-to-change-index-pattern-used-by-visualization-widget-in-kibana-dashboard-in-kibana-7-17-9/347080 "2023-11-14T05:49:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daemon1](https://avatars.discourse-cdn.com/v4/letter/d/b77776/32.png) [@Daemon1](https://discuss.elastic.co/u/Daemon1)\
**Post date:** [November 14, 2023, 5:49am UTC](https://discuss.elastic.co/t/how-to-change-index-pattern-used-by-visualization-widget-in-kibana-dashboard-in-kibana-7-17-9/347080/1 "2023-11-14T05:49:26Z")

</div>

Steps:

1. click on All type\>\>\>Aggregation based\>\>\>data table\>\>
2. select index pattern(index-pattern1) from the list(index-pattern1, index-pattern2, index-pattern3)
3. save the widget.

Now I want to change the index-pattern1 used by the widget. It should use index pattern2.

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [November 14, 2023, 8:17am UTC](https://discuss.elastic.co/t/how-to-change-index-pattern-used-by-visualization-widget-in-kibana-dashboard-in-kibana-7-17-9/347080/2 "2023-11-14T08:17:33Z")

</div>

Hi @Daemon1

unfortunately Aggregation Based visualization editor doesn't let the user change its datasource so easily.  
You can use Lens (which is available since 7.10.x) who let you switch any datasource on the fly.

---

<div class="post-metadata">

**Author:** ![Anton\_H](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anton_h/32/10200_2.png) [@Anton\_H](https://discuss.elastic.co/u/Anton_H)\
**Post date:** [November 16, 2023, 7:09pm UTC](https://discuss.elastic.co/t/how-to-change-index-pattern-used-by-visualization-widget-in-kibana-dashboard-in-kibana-7-17-9/347080/3 "2023-11-16T19:09:31Z")

</div>

Hi @Daemon1 ,  
I'm not able to provide you with an example at the moment, but when you go to saved objects and export the visualisation, you will see the id of the index-pattern used. Replace this id with the id of your preferred index-patterns and upload it to your saved objects.  
This should do the trick.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 14, 2023, 7:10pm UTC](https://discuss.elastic.co/t/how-to-change-index-pattern-used-by-visualization-widget-in-kibana-dashboard-in-kibana-7-17-9/347080/4 "2023-12-14T19:10:23Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
