Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

New table overview present data using slicer

Hi!

 

Hopefully someone can help me with the following question.

 

In my dashboard I use a slicer with different attributes from Table 1. I want to know whether or not these attributes are present in other tables. If they are, I would like to receive a "yes" or "true" or "1", etc. for that specific table.

 

To visualize:

 

Slicer table 1:

- attribute A

- attribute B

- attribute C

x attribute D

- attribute E

- attribute F

 

Table 2 | yes

Table 3 | no

Table 4 | yes

 

>> in this example Attribute D is present in Table 2 and 4 but not in 3. However, in the current Tables 2 & 4 there is a column containing the value "Attribute D" and not a "yes".

>> if I decide to click on Attribute C (instead of D) the "yes" and "no" values should (or could) change.

 

Is this possible to create?

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
amitchandak
Super User
Super User

@Anonymous , Check if treatas can help you

https://docs.microsoft.com/en-us/dax/treatas-function

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.