Forum Discussion

askspepsi's avatar
askspepsi
Helper II
6 years ago
Solved

Bring Column value as header

hi all ,  i am new to the power bi, i have a query relating to DIRECTQUERY I have a table in which the below sample data are there,     Timesheet Type OT Type OT in Mintues Manual Entry ...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi askspepsi ,

     

    You may refer the formula below.

    Table 2 =
    DISTINCT (
        SELECTCOLUMNS (
            'Table',
            "Regular Hour", SUMX (
                FILTER ( 'Table', 'Table'[OT Type] = "Regular Hour" ),
                'Table'[OT in Mintues]
            ),
            "normal Hour", SUMX (
                FILTER ( 'Table', 'Table'[OT Type] = "normal hour" ),
                'Table'[OT in Mintues]
            ),
            "special Hour", SUMX (
                FILTER ( 'Table', 'Table'[OT Type] = "special hour" ),
                'Table'[OT in Mintues]
            )
        )
    )
    

     

     

    Best Regards,

    Jay

     

    Community Support Team _ Jay Wang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.