Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Can't find Name

I want to create a calculated table to return earlier date if the logic is true but I am getting a error saying can't find of the columns.

 please see screenshort

Table 2 = SUMMARIZE('Table',[Value],[Type],[State],[Date],IF(AND('Table'[Type]="cs-accelerator-CS Accelerator Assessment",'Table'[State]="Failed"),CONVERT(MIN([Date]),STRING),"No")
 
Thanks 

8 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Please can you help little bit further az38 

       

      Below is my formula but its not working , I dont want to incluce [type] and [State] in my summarized columns as it return duplicates in my table :

       

      Table 2 = SUMMARIZE('Table',[Value],"Last",IF(AND('Table'[Type]="cs-accelerator-CS Accelerator Assessment",'Table'[State]="Failed"),CONVERT(MIN('Table'[Date]),STRING),"No"))
       
       
      What I want returned is two columns: Value and New column from the IF statement, any thought ?
  • Anonymous , Try like

     

    Table 2 = SUMMARIZE('Table','Table'[Value],'Table'[Type],'Table'[State],'Table'[Date],"Measure",IF(AND('Table'[Type]="cs-accelerator-CS Accelerator Assessment",'Table'[State]="Failed"),CONVERT(MIN([Date]),STRING),"No"))

     

    If your calculation (IF(...) ) work as measure it will work here.

    If just want rename without any grouping then use selectcolumns

    • Anonymous's avatar
      Anonymous
      Not applicable

      amitchandak  thanks for your help, that works but returning everything from the main table I want to summarize , I would like to exclude Tpe, state as they are not making my output unique,

       

      Please screenshot of what my output looks like, as you can see below, its returning two dates instead of returning just '14/01/2020' as the latest date:

       

       

       

      Please see below what I would like my output to look like :

       

      ValueMeasure
      ee6080d4-8942-ea11-a812-000d3a86d7a328/03/2020 
      a392711c-151c-ea11-a811-000d3a86d7a3No
      82ddcb3c-eb11-ea11-a811-000d3a86d545No
      0dd45e8f-a507-ea11-a811-000d3a86d6ba26/02/2020
      d476000d-d20a-ea11-a811-000d3a86d545no
      5e91e211-cd0a-ea11-a811-000d3a86d54514/05/2020 

       

       

      • amitchandak's avatar
        amitchandak
        Icon for Super User rankSuper User

        Anonymous , try to have a measure like this

        Measure =
        VAR __id = MAX ( 'Table'[Value] )
        VAR __date = CALCULATE ( MAX( 'Table'[date] ), ALLSELECTED ( 'Table' ), 'Table'[Value] = __id )
        RETURN CALCULATE ( Max ( 'Table'[date] ), VALUES ( 'Table'[Value ), 'Table'[Value] = __id, 'Table'[date] = __date )