The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
I am currently having issues with the following case:
I have a table that groups different types of information, with 40 columns, but each case has values in a different columns. Example:
Type-Col 1_Col 2_Col 3_Col 4
A --- -X-----X----" "----" " -
A --- -X-----X----" "----" "--
B --- -X-----X----" "---- X --
C --- -X ----" "---" "----" " -
D --- " " ----X----" "----X- -
D --- " " ----X----" "----X- -
E --- " " --- " " -- X ----" " -
Meaning X: has data, " " does not have data (a blank). Is it possible in Power BI to construct one table with all colums and, when I filter by Type (A, B, C, D, E), it only shows the columns does contain data?
I have tried by leaving the column with no name, and it would do the tick, but then I don't know which value X it is showing.
Regards,
Antonio
Hi @Anonymous,
Unfortunately, it is not possible to hide/show column conditionally based on slicer selection. Here is a similar idea, you could click to vote it up.
Regards,
Yuliana Gu
@Anonymous,
It is not supported in Power BI.
You can also check similar thread - http://community.powerbi.com/t5/Desktop/Conditionally-display-columns-based-on-options-in-report-filters/td-p/39107
That was something I was almonst certain, but maybe there is some who knows a trick or a custom visual that allows to do this basic task.
Thanks,
Antonio
@Anonymous,
You can play with R scripting in a way to remove columns (which called variables in R) if first value in column is NULL.
Run R script
Hello,
This wouldn't work as the columns would be deleted in the query phase, right?
What I need is a 20-values column that, depending on the data, auto-filters to only either 10, 12 or 15 of those columns, without having blank columns, as it gives unnecesary information and creastes a horizontal scroll I definitely not want.
This feature is a must, but I don't see neither many votes in the Ideas about this issue nor any announcement to include it in following PBI releases.
Regards
@Anonymous,
Actually if you will load R script which will take only not empty columns from your data source and in Power BI M script you will not do any column specific transformation then it will work properly. Let me know if this is not clear.
Hello,
I don't know about R, could you share some code so I can start bulding the tabla in R?
Thanks,