Forum Discussion

dilipkumar9's avatar
dilipkumar9
Frequent Visitor
8 years ago
Solved

dynamic rename column lable based on slicer value

i have 2 table, fact table with accountid, monthid, booked ,booked mm-1 (prev month booked $) . i have a timedim table with monthname, prevMonth columns with one tomany relation . i am using matrix talbe and  a slicer on monthname.

i am having hard time writing a power query on edit query to rrename column on fact table .

 

below is what ia m looking for . booked : booked (2018 feb ) , booked mm-1 : booked(2018 Jan).

  • Hi dilipkumar9,

     

    You can use "Unpivot Columns" in Editor Queries to make some column names be row values in the new "attribute" column, then the date in date column and these column names are both row values so that you can use slicer based on date column to filter names. 

     

    However, the senario to change column names dynamically based on row value is not possible. In a chart, the column name will be shown as row values after "Unpivot Columns".

     

    Hope it's clear.

    Jimmy Tao

1 Reply

  • v-yuta-msft's avatar
    v-yuta-msft
    Icon for Community Support rankCommunity Support

    Hi dilipkumar9,

     

    You can use "Unpivot Columns" in Editor Queries to make some column names be row values in the new "attribute" column, then the date in date column and these column names are both row values so that you can use slicer based on date column to filter names. 

     

    However, the senario to change column names dynamically based on row value is not possible. In a chart, the column name will be shown as row values after "Unpivot Columns".

     

    Hope it's clear.

    Jimmy Tao