Forum Discussion

zzzsou's avatar
zzzsou
Frequent Visitor
3 years ago
Solved

Crete a table from another table with selected slicer

Hello,

 

Here is my data set.

 

table1

week_numweek_rank
2021511
2021522
2022013
2022024
2022035
2022046
2022057
.... 
20221012

 

the format of [week_num] is "YYYY+week number" and I use the table with single slicer to get data with selected [week_num]. 

 

However I would like to get another table from the table with selected value of slicer 

 

table2(what I would like to get)

if I select 202204 from slicer then I only want to get 5 rows from what I select from table 1

table2

week_numweek_rank
2021522
2022013
2022024
2022035
2022046

 

So here is my table create formula

 

table2=

FILTER(

           ALL('table1'[week_num],'table1'[week_rank]),

                  'table1'[week_rank])<=max('table'[week_rank]))&&

                  ('table1'[week_rank])>max('table'[week_rank])-5)

           )              

but it only returns like below.

week_numweek_rank
202206a8
2022079
20220810
20220911
20221012

 

Could you kindly help me please?

1 Reply