How to slice comparing columns from different tables

Hi guys,

I am pretty sure I did read something about my request somewhere but can’t find it anymore. My need is:

I have an Order table with a date column and a ref column refering to another table called Accounting periods.

In the table Accounting period I have a virtual column Yes/No type that determine if a row is the current accounting period or not. Formula to do so is : AND([date_début] <= TODAY(), TODAY() <= [Date_fin]).

First I need that the ref column in the order table compute automatically what is the correct Accounting period according to the date.

Then I would like to create a slice that filters all Orders fitting the current Accounting period.

Any advice on the way to do that ?

Thanks

Solved Solved
0 7 552
1 ACCEPTED SOLUTION

You could just wrap the original FILTER() expression itself in ANY() if you’d like to avoid the extra virtual column:

ANY(
  FILTER(
    "Accounting Period",
    AND(
      ([_THISROW].[Order Date] >= [date_début]),
      ([_THISROW].[Order Date] <= [Date_fin])
    )
  )
)

View solution in original post

7 REPLIES 7
Top Labels in this Space