Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Creating slicer for date using a column from one table to select a value from another table

Hi all,

I need your help with the following issue:

 I have 2 tables for eg : A & B . Table B has multiple columns out of which one of them is 'Date' .Table A & B has one column in common with many to many relationship.  The main goal is to create a slicer using Date column from table B to make  selection for 'KPI Value' column in table A . Table A & B are not connected.

So, if anyone please help me with the issue.

2 Replies

  • Anonymous , if A and B are not  joined

     


    //Filter Date in A
    new measure =
    var _max = maxx(allselected(B),B[Date])
    var _min= minx(allselected(B),B[Date])
    return
    calculate(Sum(A[Value]), filter(A, A[date] >= _min && A[Date]<= _max))