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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Hidden visuals setting data

Hello every one,

I create a custom visual and consult code from sampleBarChart in this link github.
https://github.com/microsoft/PowerBI-visuals-sampleBarChart/tree/condFormat/Tutorial
And I have a problem: I created a setting to be able to store my persist data. Let's say it is General View. I want it to not show up on the screen and work normally. But when I hide it, I can't get data from it anymore. How should I do it?

LortT_0-1733888765255.png

LortT_1-1733889100349.pngLortT_2-1733889158365.png

 

 

1 ACCEPTED SOLUTION
dm-p
Super User
Super User

Hi @Anonymous,

 

When you say 'hide,' do you mean remove/comment out as per your screenshot? If so, this will not populate the formatting model and will be inaccessible, as you have experienced.

 

If you are using powerbi-visuals-utils-formattingmodel to manage your formatting model, you can add and set the visible property of your settings class that represents the CompositeCard to false (while the rest of your code isn't available in OP, I would assume that your GeneralViewCardSettings class extends CompositeCard). By setting the visibility, your model is still processed as intended (and the property is therefore available for persistence/retrieval).

Regards,

 

Daniel





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

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @Anonymous,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

Anonymous
Not applicable

Hi @Anonymous,

We haven’t heard back from you for some time, so just following up to our previous message. We hope your issue has been resolved.

If the solution we provided has worked for you, kindly mark it as the accepted solution. Your feedback is important to us, Looking forward to your response. 

 

Thank you for being a valued member of the Microsoft Fabric Community Forum!

dm-p
Super User
Super User

Hi @Anonymous,

 

When you say 'hide,' do you mean remove/comment out as per your screenshot? If so, this will not populate the formatting model and will be inaccessible, as you have experienced.

 

If you are using powerbi-visuals-utils-formattingmodel to manage your formatting model, you can add and set the visible property of your settings class that represents the CompositeCard to false (while the rest of your code isn't available in OP, I would assume that your GeneralViewCardSettings class extends CompositeCard). By setting the visibility, your model is still processed as intended (and the property is therefore available for persistence/retrieval).

Regards,

 

Daniel





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

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Anonymous
Not applicable

Hi @Anonymous,

As we haven’t heard back from you, so just following up to our previous message. We hope your issue has been resolved.

If the solution we provided has worked for you, kindly mark it as the accepted solution. Your feedback is important to us, Looking forward to your response.

 

Thank you for being a valued member of the Microsoft Fabric Community Forum!

Anonymous
Not applicable

Hi @Anonymous,

Thanks for reaching out to the Microsoft fabric community forum.

Can you please provide some more details on what visual you were using? To address your issue of persisted data being inaccessible when hidden in a custom Power BI visual, it's important to understand how Power BI's properties and persistence mechanisms work.

 

Thank you. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.