Forum Discussion

5 Replies

  • lkalawski's avatar
    lkalawski
    Icon for Resident Rockstar rankResident Rockstar

    Hi Analitika ,

     

    You didn't provide the main information. Based on what is it to be grouped? How do we know that the first PRD record is to contain the concatenation of the first two PGs, and the second PRD of the third PG?

    I need to know the logic of this.

     

    EDIT: I already noticed - the last second column contains this.


    _______________
    If I helped, please accept the solution and give kudos! 😀

  • lkalawski's avatar
    lkalawski
    Icon for Resident Rockstar rankResident Rockstar

    Hi Analitika ,

     

    Using the second last column, you can write two measures that will sum the values and concatenate the document numbers:

    Sum of _payments =
    SUMX (
        FILTER (
            ALL ( opzurant ),
            opzurant[Sukab_2.ApNr] = SELECTEDVALUE ( opzurant[DOKUMNR] )
        ),
        [_payments]
    )
    Concat of Dokumnr =
    CONCATENATEX (
        FILTER (
            ALL ( opzurant ),
            opzurant[Sukab_2.ApNr] = SELECTEDVALUE ( opzurant[DOKUMNR] )
        ),
        opzurant[DOKUMNR],
        ", "
    )

    The result:



    _______________
    If I helped, please accept the solution and give kudos! 😀

    • Analitika's avatar
      Analitika
      Icon for Post Prodigy rankPost Prodigy

      lkalawski 

       

      Result wrong see please attached photo, and concatenate is wrong as in last row must be B60925, B58725

       

       

      • Analitika's avatar
        Analitika
        Icon for Post Prodigy rankPost Prodigy

        amitchandak 

         

        Why not work ALL() ?

         

        _payments =
        CALCULATE (
        sum ( opzurant[Column 2] )
        ,FILTER ( opzurant, [Column 3] <= MAX ( 'Date'[Date] ) )
        ,ALL(opzurant[ZURNKOD]
         
        )