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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

use dax funxtion to hide columns ,only show the columns i select

Hello , 
    i create three field ,and i seperate the data column name into these three field ,and i also add two slicer for the table selecting ,if i select nothing ,it will show all the columns ,if i select in all the filter ,then it will show the column i select.
   now i want the table to be if i select nothing ,it will only show the column that will always show[column 1],if i select the columns in the filter , it will show the columns with [column 1]
    how can i do to achieve this ? really thankful if somebody can answer my question.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

 

Please try this:

Here I create a set of sample:

Table:

vzhengdxumsft_0-1730790916339.png

Then add a Fields Parameter:

Let report readers use field parameters to change visuals (preview) - Power BI | Microsoft Learn

vzhengdxumsft_1-1730790972070.png

In the table view, add a calculated column in the Parameter table:

Column = MID('Parameter'[Parameter],1,8)

vzhengdxumsft_2-1730791069308.png

Finally, create a Slicer, the result is as follow:

vzhengdxumsft_3-1730791114103.png

vzhengdxumsft_4-1730791121006.png

vzhengdxumsft_7-1730791150924.png

 

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Ritaf1983
Super User
Super User

Hi @Anonymous 

Please provide a workable sample data and your expected result from that. It is hard to figure out what you want to achieve from the description alone.  

https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Anonymous
Not applicable

I create three field [AO],[Attribute],[Measure],column a are from [AO],column b are from [Attribute],column C from [Measure],each field multiple select is accepted , so there are maybe have situations like :

ag_cdcolumn acolumn b column b1column ccolumn c1column c2.... 
         
         
         
         
         
         
         
         
         

if i select nothing , i want the table to only show like this

ag_cd
 
 
 
 
 
 
 
 
 
Anonymous
Not applicable

Hi @Anonymous 

 

Please try this:

Here I create a set of sample:

Table:

vzhengdxumsft_0-1730790916339.png

Then add a Fields Parameter:

Let report readers use field parameters to change visuals (preview) - Power BI | Microsoft Learn

vzhengdxumsft_1-1730790972070.png

In the table view, add a calculated column in the Parameter table:

Column = MID('Parameter'[Parameter],1,8)

vzhengdxumsft_2-1730791069308.png

Finally, create a Slicer, the result is as follow:

vzhengdxumsft_3-1730791114103.png

vzhengdxumsft_4-1730791121006.png

vzhengdxumsft_7-1730791150924.png

 

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors