Forum Discussion

lz90's avatar
lz90
Regular Visitor
8 years ago

Dynamic field name

Hi all,

 

I have the following issue:

 

I have a pilot table and filtering fields for each columns in pivot. First column is called "Shops". In this column, I have all shops (they are in 2 categories- Hypermarkets and supermarkets) and this calmn shows all names based on the filter. BUT I need to do - if the report is for Hypermarket, then show column name "Hypermarket" and show all names for Hypermarket. If the report is filtered for Supermarket then show lapel Supermarcets and show the names. The colum works but how to make this dynamic fieldname? Now it is "Hypermarcet/Supermarket" but it is not ok

3 Replies

  • v-qiuyu-msft's avatar
    v-qiuyu-msft
    Community Support

    Hi lz90,

     

    Would you please use some dummy data to clarify your requirement? 

     

    Best Regards,
    Qiuyun Yu 

    • lz90's avatar
      lz90
      Regular Visitor

      Hi Qiuyun,

      Yes. I have data in pivot table for Hypermarkets and Supermarkets. These are results from our web app and visualized in power BI. We have all data for Super and Hypermarket in one database table, but the result is based on filter in our web app. It is ok and if the customer run the report for Supermarket, he will see the column with supermarkets:
      Supermarkets/Hypermarkets
      S1
      S2
      S3
      ...
      If they run it for Hypermarket, it will show the data for hypermarkets:
      Supermarkets/Hypermarkets
      H1
      H2
      H3
      ...
      The issue is- how can I make a field name depends on the category:
      Supermarkets:
      S1
      S2
      S3   or
      Hypermarkets:
      H1
      H2
      H3
      ?

      Best Regards

      • v-qiuyu-msft's avatar
        v-qiuyu-msft
        Community Support

        Hi lz90,

         

        In Power BI side, it's not able to set dynamic column field name.

         

        Best Regards,
        Qiuyun Yu