Forum Discussion

htsvhwave's avatar
htsvhwave
Icon for Helper II rankHelper II
2 years ago

Dax calculation needs to return a value in another column

Hi

I have the following measure where i have calculated the oldest case with a caseworker:

    CALCULATE(
        MIN(WZdatafeed[Created date]),
        NOT ISBLANK(WZdatafeed[caseworker]),
        WZdatafeed[cases closed] = 0, ALL(Dato)
    )

however i also want to add that the value i want retured is the column called date +caseworker, right now the measure return the created date how can i do that, also my measure needs to ignore filters as i have a week and year filter on my report

Created datecase workercaseworker + date
1/1/2023Hanna1/1/2023 (Hanna)
23/8/2023Denise23/8/2023(Denise)
15/6/2023Allan15/6/2023(Allan)
 

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi htsvhwave ,

    Below is my table:

    The following DAX might work for you:

     

     

    Caseworker + date = 
       var  C_date = SELECTEDVALUE(WZdatafeed[Created date])
       var  CW = SELECTEDVALUE(WZdatafeed[case worker])
       var text1 = COMBINEVALUES(" ","(",CW,")")
       var result = CALCULATE(CONCATENATE(C_date,text1) , ALL(WZdatafeed))
       return result
    

     

     

    The final output is shown in the following figure:

    Best Regards,

    Xianda Tang

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

    • htsvhwave's avatar
      htsvhwave
      Icon for Helper II rankHelper II

      i think you misunderstod my question, need help to add to this measure down below, it calculates the right date however i want it instead to return the value in the caseworker+date column, i already have made a calculated column called caseworker+date and i need to ignore the filter in my page also because when i use this measure it adust to the filter on the page and i want to ignore the filter

      VAR OldestOpenCaseDate =
          CALCULATE(
              MIN(WZdatafeed[Oprettede dato]),
              NOT ISBLANK(WZdatafeed[Sagsbehandler]),
              WZdatafeed[Sager afsluttede] = 0
          )
      RETURN
          IF(
              NOT ISBLANK(OldestOpenCaseDate),
              MAXX(
                  FILTER(
                      WZdatafeed,
                      WZdatafeed[Oprettede dato] = OldestOpenCaseDate &&
                      NOT ISBLANK(WZdatafeed[Sagsbehandler]) &&
                      WZdatafeed[Sager afsluttede] = 0
                  ),
                  WZdatafeed[Dato + Navn]
              ),
              BLANK()
          )
  • Hi,

    Share raw data in a format that can be pasted in an MS Excel file.  For that data, show the expected result.