Forum Discussion

sh10's avatar
sh10
New Member
7 years ago
Solved

Excel Index Match to retrieve a data column based on selected value

Hello! I did a formula below in Excel to get a column of data based on the selected value in a Slicer.

For example, if a user select July in the slicer, it returns me the row of column values for July.

How can i perform this in Power BI?

 

INDEX('Cost Center AOP'!$G:$R,,MATCH($H$2,'Cost Center AOP'!$G$5:$R$5,0))

 

 

Cost Center AOP data

 

May   |    June   |      July   |     August    <---Column Name

$0            $1             $2              $3

$1            $2             $2              $2

$3            $3             $3              $3  

  • Hi sh10,

     

    You can't do this directly in power bi because all the filter is based on rows, not columns. As a workaround, you can click-> query editor-> transform-> unpivot columns as below:

     

     

    After applied&closed, create a slicer visual based on attribute column like below:

     

     

    Regards,

    Jimmy Tao

1 Reply

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

    Hi sh10,

     

    You can't do this directly in power bi because all the filter is based on rows, not columns. As a workaround, you can click-> query editor-> transform-> unpivot columns as below:

     

     

    After applied&closed, create a slicer visual based on attribute column like below:

     

     

    Regards,

    Jimmy Tao