Forum Discussion

sureshcu's avatar
sureshcu
Helper I
8 years ago
Solved

Summarize Table to retrieve 2017 data

Hi,

 

I have created Table using summarize function. however, I want to restrict the data of 2017 only. Can you please help to retrieve only 2017 data. I have written the following measure.

 

HC & Attrition % = SUMMARIZE(Append1,Append1[Reporting Month],"Total HC",[Total EMP],"Total Attrition",[Attrition])

 

  • sureshcu's avatar
    sureshcu
    8 years ago

    You Rock Zubair. A ton thanks for you. It is working fine

6 Replies

  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    Community Champion

    Hi sureshcu

     

    Wrap it with a filter

     

    Try this

     

    HC & Attrition % =
    FILTER (
        SUMMARIZE (
            Append1,
            Append1[Reporting Month],
            "Total HC", [Total EMP],
            "Total Attrition", [Attrition]
        ),
        YEAR ( Append1[Reporting Month] ) = "2017"
    )
    • sureshcu's avatar
      sureshcu
      Helper I

      Hi Zubair,

       

      I have tried. it is throwing the following error

       

      DAX comparison operations do not support comparing values of type Integer with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values.