Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Column selection based on dropdown

I have a database where the first column contains historic dates. The remaining columns all contain historic data. Each columnheader has the following structure country+number For example us2, us5, ...
  • mh2587's avatar
    1 year ago

     

    Go to Power Query:

    • Transform Data in Power Query

      • Select all country-number columns (us2, us5, etc.).
      • Click Transform > Unpivot Columns.
      • Rename new columns to CountryNumber and Value.
      • Split CountryNumber into Country and Number.
    • Use Simple Filtering

      • Create slicers for Country and Number.
      • Use Value in the graph, filtering based on the slicers.