Forum Discussion
capko
3 years agoHelper II
Check between two dates and two tables
Hello, Let's say that I have two tables: Table 1 | A | Date |
|----|------------|
| A1 | 01/02/2012 |
| A1 | 03/04/2015 |
| A2 | 04/03/2012 |
| A5 | 25/07/2018 |
| A1 | 0...
Ahmedx
3 years agoSuper User
Of course you can write like this:
Column =
VAR _tbl =
SELECTCOLUMNS (
GENERATE ( 'Table2', GENERATESERIES ( 'Table2'[Date 1], 'Table2'[Date 2], 1 ) ),
"@Category", [Category],
"@Date", [Value]
)
RETURN
COUNTX( FILTER ( _tbl, [@Category] = [Category] && [@Date] = [Date] ), [@Date])+0
------or----
Column =
VAR _tbl =
SELECTCOLUMNS (
GENERATE ( 'Table2', GENERATESERIES ( 'Table2'[Date 1], 'Table2'[Date 2], 1 ) ),
"@Category", [Category],
"@Date", [Value]
)
RETURN
COUNTROWS(FILTER ( _tbl, [@Category] = [Category] && [@Date] = [Date] ))+0