Forum Discussion

gopichilla's avatar
gopichilla
Resolver III
9 years ago
Solved

How to find data in table.

I am facing a problem getting data into the table. The condition is (In a table having a Department column and other columns, in department column contains a HR, Financial, Account, etc.  But I want only HR department data)

 

Thanks, 

Gopi.

  • Hi gopichilla,

     

    Could you post some sample data of your Department column with your expected result? So that we can help to write the query for you.:smileyhappy:

     

    Regards

  • Hi gopichilla,

     

    In this scenario, you can use ADDCOLUMNS or SELECTCOLUMNS function(DAX) to create a new calculate table with the Department data you want. The formula below is for your reference.:smileyhappy:

    NewTable =
    ADDCOLUMNS (
        FILTER ( Table1, Table1[Department] = "Web Development" ),
        "HR Department", Table1[Department]
    )
    

    Note: Replace "Table1" with your real table name in the formula above.

     

    Regards

  • Hi gopichilla,

     

    A little confused! Could you post your expected result against the sample data above?:smileylol:

     

    Regards

  • gopichilla's avatar
    gopichilla
    9 years ago

    Thank u for helping I got a solution to my problem.

9 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Well, you can filter that in your query, or create a slicer in your report and just slice out HR.

    • gopichilla's avatar
      gopichilla
      Resolver III

      Thank u for your answer. 

      It possible but we want any query by creating the new column.

      • v-ljerr-msft's avatar
        v-ljerr-msft
        Microsoft Employee

        Hi gopichilla,

         

        Could you post some sample data of your Department column with your expected result? So that we can help to write the query for you.:smileyhappy:

         

        Regards