Forum Discussion

14 Replies

  • DiePic 

    why not use the slicer date between?

    it will give you the sum of amount of that period

    • DiePic's avatar
      DiePic
      Resolver II

      Hi ryan_mayu and thank you for your reply

      your suggestion is perfect for the 1st part of my goal.

      now I need to insert a column that contain for every "customer code" (1st column):
      (sum AVERE) - (sum DARE) for the period previous the 1st data in the slicer.

      There is a dax formula or another way to do that?

      ....
      I try with this dax formula but resul is all fields blanks

      CALCULATE (
        SUM ( Movimenti[SALDO] ),
          FILTER (
            Movimenti,
            Movimenti[Customer No_] = [SelectedCliente]
            && Movimenti[Accounting Date] < [DataInizio]
          )
      )

      ... where [SelectedCliente] and [DataInizio] are 2 measures that working
      [DataInizio] = DATEVALUE(CALCULATE(MIN('Movimenti'[Accounting Date]),ALLSELECTED(Movimenti)))

      [SelectedCliente] = SELECTEDVALUE(Movimenti[Customer No_])

       
      • ryan_mayu's avatar
        ryan_mayu
        Super User

        could you pls provide sample data (not the screenshot) and the expected output. I can't find the soution based on the screenshots and DAX you provided

         

  • Maybe it's not the best way and if some expert will suggest another idea, it will be apprecied, because in that way, I've a file with double weight.
    .....
    I solved duplicating the query/table "Movimenti" in "Movimenti2" and  I've applied the measure on the 2nd table ... in this way it's working for me.

     

  • Hi,
    If you need static table.. then you can use power query group by function to generate a new table