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 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?
Solved! Go to Solution.
Hi @LortT,
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
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Hi @LortT,
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.
Hi @LortT,
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!
Hi @LortT,
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
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Hi @LortT,
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!
Hi @LortT,
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.