Forum Discussion

ngiolet91's avatar
ngiolet91
Frequent Visitor
2 years ago

DAX applied on Table filter dynamically

Hello,

I have a TABLE A with multiple data.

I create a TABLE B with several CALCULATE functions using data from TABLE A. No relation between TABLE A & TABLE B.
I would like that calculus made in Table B follow dinamically the filters applied in Table A in order to extract info dynamically from different subsets of Table A.

2 Replies

    • ngiolet91's avatar
      ngiolet91
      Frequent Visitor

      Thanks!
      I am trying to figure it out but I do not get how "treatas" works.

      This is one of the column calculated in Table B (BugCalendar) from Table A (BugCurve)

      Open =
      VAR Data = 'BugCalendar'[Date]
      VAR Conta = CALCULATE(COUNTROWS(('BugCurve')),
          (NOT ISBLANK(BugCurve[Open]) &&  BugCurve[Open] <= Data) &&
              ((BugCurve[Processing]) >= Data || ISBLANK(BugCurve[Processing])) &&
              ((BugCurve[Rejected]) >= Data   || ISBLANK(BugCurve[Rejected])) &&
              ((BugCurve[Closed]) >= Data || ISBLANK(BugCurve[Closed]))
      )+0
      RETURN
      IF(Data<= TODAY(),Conta,BLANK())

      Filtering BugCurve using slice does not affect BugCalendar calculus. How to use TREATAS here?

      Regards