Forum Discussion
Hide few column in Table
Hi All,
Please note, i have to hide few columns in below table from Product ID Description till Mainstream (like group-by in excel).
Thank you
Regards,
harirao There is no hiding of columns like in Excel. You can turn off word wrap and shrink columns to nothing but that's not going to be dynamic unless you use something like a bookmark. I'm not familiar with Group By functionality in Excel that is dynamic either but not an Excel guru.
- Anonymous5 years ago
Hi harirao
In addition to Greg_Deckler 's reply, there is no hiding column function like excel in power bi. However you can try measure and slicer to achieve your goal.
I build a sample table to have a test.
Build a Slicer Table Detail/No Detail
If you don't want to change your data model and show results in table visual.
Build measures by the columns you want to hide.
M.Detail1 = IF(SELECTEDVALUE(Slicer[Slicer])="Detail",MAX('Table'[Detail1]),BLANK())M.Detail2 = IF(SELECTEDVALUE(Slicer[Slicer])="Detail",SUM('Table'[Detail2]),BLANK())Then build a table visual by common columns and measure columns.
Or you can try to unpivot the columns without Month and FCST Month in power query editor.
New Table:
Build a Measure:
Measure = IF ( HASONEFILTER ( Slicer[Slicer] ), IF ( SELECTEDVALUE ( Slicer[Slicer] ) = "No Detail", CALCULATE ( MAX ( 'Table (2)'[Value.1] ), FILTER ( 'Table (2)', NOT ( 'Table (2)'[Attribute] IN { "Detail1", "Detail2" } ) ) ), MAX ( 'Table (2)'[Value.1] ) ), BLANK () )Build a Matrix
Result:
Select No Detail:
Select Detail:
You can download the pbix file from this link: Hide few column in Table
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous5 years ago
Hi harirao
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your problem or share me with your pbix file from your Onedrive for Business.
Best Regards,
Rico Zhou
6 Replies
- Greg_Deckler
Community Champion
harirao When you say "hide", do you want the same number of rows or no?
- harirao
Post Prodigy
Hello Greg_Deckler,
Thanks for your response, yes i want same number of rows and also whenever a Product ID is selected want to details should be available/visible something like group-by in excel.
- Greg_Deckler
Community Champion
harirao There is no hiding of columns like in Excel. You can turn off word wrap and shrink columns to nothing but that's not going to be dynamic unless you use something like a bookmark. I'm not familiar with Group By functionality in Excel that is dynamic either but not an Excel guru.
- AnonymousNot applicable
Hi harirao
In addition to Greg_Deckler 's reply, there is no hiding column function like excel in power bi. However you can try measure and slicer to achieve your goal.
I build a sample table to have a test.
Build a Slicer Table Detail/No Detail
If you don't want to change your data model and show results in table visual.
Build measures by the columns you want to hide.
M.Detail1 = IF(SELECTEDVALUE(Slicer[Slicer])="Detail",MAX('Table'[Detail1]),BLANK())M.Detail2 = IF(SELECTEDVALUE(Slicer[Slicer])="Detail",SUM('Table'[Detail2]),BLANK())Then build a table visual by common columns and measure columns.
Or you can try to unpivot the columns without Month and FCST Month in power query editor.
New Table:
Build a Measure:
Measure = IF ( HASONEFILTER ( Slicer[Slicer] ), IF ( SELECTEDVALUE ( Slicer[Slicer] ) = "No Detail", CALCULATE ( MAX ( 'Table (2)'[Value.1] ), FILTER ( 'Table (2)', NOT ( 'Table (2)'[Attribute] IN { "Detail1", "Detail2" } ) ) ), MAX ( 'Table (2)'[Value.1] ) ), BLANK () )Build a Matrix
Result:
Select No Detail:
Select Detail:
You can download the pbix file from this link: Hide few column in Table
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anand24
Super User
Hi harirao ,
The best way here is to simply turn-off word wrap of both column headers and values and then reduce the width to zero.
By this way, you will be able to hide the columns from your table visualization while keeping the grouping(or granularity here) intact.
Give a thumbs up if this post helped you in any way and mark this post as solution if it solved your query !!!
- AnonymousNot applicable
Hi harirao
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your problem or share me with your pbix file from your Onedrive for Business.
Best Regards,
Rico Zhou