Forum Discussion
New table overview present data using slicer
- Anonymous6 years ago
HI Anonymous,
I'd like to suggest you enter to 'query editor' to add a blank table that collection other queries' name and structure, then you can simply write a measure formula to compare current table name and attribute names.
let Source = #table(type table[#"Table Name"=text,#"Column Name"=list],{{"Table1",Table.ColumnNames(Table1)}},{"Table2",Table.ColumnNames(Table2)}},{"Table3",Table.ColumnNames(Table3)}},{"Table4",Table.ColumnNames(Table4)}}, {"Table5",Table.ColumnNames(Table5)}}), #"Expanded column name" = Table.ExpandListColumn(Source, "Column Name") in #"Expanded column name"Measure formula:
Measure = VAR attributeList = CALCULATETABLE ( VALUES ( 'Collection'[Column Name] ), ALLSELECTED ( 'Collection' ), VALUES ( 'Collection'[Table Name] ) ) RETURN IF ( SELECTEDVALUE ( 'Selector'[Attribute] ) IN attributeList, "Y", "N" )Notice: Collection means the table that stored table name and column name, selector means table that used as the source of slicer.
Regards,
Xiaoxin Sheng
HI Anonymous,
I'd like to suggest you enter to 'query editor' to add a blank table that collection other queries' name and structure, then you can simply write a measure formula to compare current table name and attribute names.
let
Source = #table(type table[#"Table Name"=text,#"Column Name"=list],{{"Table1",Table.ColumnNames(Table1)}},{"Table2",Table.ColumnNames(Table2)}},{"Table3",Table.ColumnNames(Table3)}},{"Table4",Table.ColumnNames(Table4)}},
{"Table5",Table.ColumnNames(Table5)}}),
#"Expanded column name" = Table.ExpandListColumn(Source, "Column Name")
in
#"Expanded column name"
Measure formula:
Measure =
VAR attributeList =
CALCULATETABLE (
VALUES ( 'Collection'[Column Name] ),
ALLSELECTED ( 'Collection' ),
VALUES ( 'Collection'[Table Name] )
)
RETURN
IF ( SELECTEDVALUE ( 'Selector'[Attribute] ) IN attributeList, "Y", "N" )
Notice: Collection means the table that stored table name and column name, selector means table that used as the source of slicer.
Regards,
Xiaoxin Sheng