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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
JMSNYC
Helper III
Helper III

Display Table Column Using Slicer

Hi.

 

I looked at tons of posts on this forum without finding the answer:

 

I have a monster FACT table, that I CANNOT unpivot. Hence, 

 

  • I need to have the column names into a slicer
  • By selecting the names in the slicer, it will make columns (and their respective values) appear and/or disappear in a Table or a Matrix 

Thank you for letting me know how I should proceed.

 

Best regards

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @JMSNYC ,
 
If your data size is not large and you can edit query in the data, you can try to use "Unpivot columns".
Assume your table is like this:
test_table.PNG
 
In Edit quieries, select the subject columns , then in "Transform"->"Unpivot columns", the dataset would change as below:
unpivot.PNG

 

You can refer to this pbix.
 
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
JarroVGIT
Resident Rockstar
Resident Rockstar

I am afraid you are out of luck, as far as i know you can only achieve this with unpivoting the table. Note that you can also unpivot tables in DAX as a calculated table (if you can't perform Power Query steps in your use case). 

 

CalcTable =
UNION(
   SELECTEDCOLUMNS(Table1, "ID", Table1[ID], "ColName", "Column1", "Value", Table1[Column1]),
   SELECTEDCOLUMNS(Table1, "ID", Table1[ID], "ColName", "Column2", "Value", Table1[Column2]),
   SELECTEDCOLUMNS(Table1, "ID", Table1[ID], "ColName", "Column3", "Value", Table1[Column3]),
   SELECTEDCOLUMNS(Table1, "ID", Table1[ID], "ColName", "Column4", "Value", Table1[Column4]),
)

 

I haven't tested the above on large datasets with many columns, but this could be helpful for you. If this is not helpful, please ellaborate on your statement that you cannot unpivot the dataset 🙂

 

EDIT: well I did found this blog Display Measures based on slicer but that would require for you to create measures for all your columns to display the value (if possible). That still isn't totally what you are after I guess, but it is something?

 

Kind regards

Djerro123

-------------------------------

If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.

Keep those thumbs up coming! 🙂





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.