Forum Discussion

ozgurozturk98's avatar
ozgurozturk98
Frequent Visitor
7 years ago

Counting rows

Hi all,

 

The table you see here consists of:

 

Date, ENDSOL, ENDIST, FA naantal, IST2 (Produced or not produced), and Column.

 

What I am trying to do is that at Column. The rows are added together.

 

Example given:

 

In the first row is the desired delivery date 08-06-18, where 1 product must be delivered (FA-aantal). However, this is produced on 11-06-18 (ENDIST), because of this, there is no number in the first row (IST2) because nothing is produced. This number of the first row (FA number) must be added to the current date (Date) and that is row 2. So in row 2, (Column) should be  number 2. Because the ENDIST and Date are equal to each other.

 

Can you help me with this?

 

It should be like this.


 

3 Replies

    • ozgurozturk98's avatar
      ozgurozturk98
      Frequent Visitor

      I've found something like this on the forums:

       

      Count of Active Employee =
      VAR currentDate =
           MAX ( 'DateTable1'[Date] )
      RETURN
          CALCULATE (
              COUNTROWS ( Master ),
              FILTER (
                  ALL(Master),
                     ( Master[Start Date] <= currentDate
                               && Master[End Date] >= currentDate )

       

      But it seems like it is not working. 

      • v-piga-msft's avatar
        v-piga-msft
        Resident Rockstar

        Hi ozgurozturk98,

         

        Besed your description, if I understand your sceanrio correctly that the first five columns are the original data and the last column is what you want?

         

        If it is, I'm still a little confused about your scenario, it seems that the colmn is calculated based on the FA-aantal, but what is the logic condition? 

         

        Could you describe your scenario in more details?

         

        Best  Regards,

        Cherry