Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi all,
I have carried out things similar to this previously with bookmarks, but in this instance I am not quite sure that would fit within the current report environment.
I have a report, and when the product type equals "Software" I'd like for a column called "Warranty" to be hidden; but when product type equals anything else I'd like the "Warranty" column to be shown.
The data is currently in a table and filtered by a dropdown slicer.
I have thought about creating a DAX query and conditional formatting to hide the text in the "Warranty"column when the selection is "Software", but that would leave a blank column which may look odd - and as mentioned at the start, previously I would have used a bookmark navigator and two tables as a way around this, but I'd really like to keep all the options within the single dropdown slicer if at all possible.
Any thoughts welcome!
Solved! Go to Solution.
Create a measure to control the display:
ShowWarranty =
IF(
SELECTEDVALUE('YourTable'[Product Type]) = "Software",
BLANK(),
MAX('YourTable'[Warranty])
)
This will hide the data in the "Warranty" column when "Software" is selected, but the column itself will remain visible (as a blank).
💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
Hi,
Thanks for the solution shafiz_p and Kedar_Pande offered, and i want to offer some more information for user to refer to.
hello @SeniorJunior , based on your description, it is better that use two tables, you can refer to the following sample.
Sample data
Product Type table.
Data table
You can create a columnname table.
Then creaete a measure.
MEASURE =
SWITCH (
SELECTEDVALUE ( 'Table'[Columnname] ),
"Value2", CALCULATE ( MAX ( 'Value'[Value2] ) ),
"Value3", CALCULATE ( MAX ( 'Value'[Value3] ) ),
"Warranty",
IF (
SELECTEDVALUE ( 'Product Type'[Product Type] ) <> "Software",
MAX ( 'Value'[Warranty] )
)
)
Then create a matrix visual ,and input the following field the matrix.
Outptut
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is an interesting approach, I have started with the measure approach which hides values but keeps the column, but this is also interesting as a way to address the query.
Thank you
Hi @SeniorJunior
Unfortunately, Power BI does not natively support hiding column except field parameter. Through field parameter you would be able to show/hide matrix visual column. You can show blank value upon software selection in slicer.
Create a measure to control the display:
ShowWarranty =
IF(
SELECTEDVALUE('YourTable'[Product Type]) = "Software",
BLANK(),
MAX('YourTable'[Warranty])
)
This will hide the data in the "Warranty" column when "Software" is selected, but the column itself will remain visible (as a blank).
💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
Perfect - and quite straightforward to implement and explain, thank you!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
87 | |
81 | |
53 | |
37 | |
35 |