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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
WouterBo
Helper II
Helper II

Dataview does not contain all categories unless I drill?

Hi,

 

When adding more than one category to a custom visual with a categorical dataview, the visual's Metadata only lists the first category in the dataview. Until the user actually uses drilling does the Metadata show the active categories, i.e. I have no access to the categories not drilled to if I want to render a categor axis.

 

The clustered bar visual (from PowerBI itself) is capable of showing all of the category axes before the user has done any drilling. 

 

How can I access all of the categories in a custom visual before the user has used drilling in order to render the category axes?

 

1 ACCEPTED SOLUTION
WouterBo
Helper II
Helper II

I'll provide the answer to this one myself...

 

When developing (not just using) your own custom visual with a categorical datamapping, you can allow the user to add multiple categories. However, unless the user uses drilling, your dataview will only contain a single category. I.e. your custom visual must test for this by counting the number of categories in the dataview.

 

Visuals from powerbi itself seem to have an option to open a visual in drilled down mode. A feature not available to custom visuals using the API. This explains the difference my question was about.

 

Thank you.

View solution in original post

2 REPLIES 2
WouterBo
Helper II
Helper II

I'll provide the answer to this one myself...

 

When developing (not just using) your own custom visual with a categorical datamapping, you can allow the user to add multiple categories. However, unless the user uses drilling, your dataview will only contain a single category. I.e. your custom visual must test for this by counting the number of categories in the dataview.

 

Visuals from powerbi itself seem to have an option to open a visual in drilled down mode. A feature not available to custom visuals using the API. This explains the difference my question was about.

 

Thank you.

v-yiruan-msft
Community Support
Community Support

Hi @WouterBo ,

If I understand correctly, it seems that you are trying to a custom visual. But it can display all categories, it only display the first category. However, Power BI default clustered bar chart display normally. Here are a few things you can try to ensure that all categories are displayed:

1. Check the visual settings: Some custom visuals have settings that allow you to control which categories are displayed by default. Check the visual settings to see if there is an option to display all categories.

2. Check the drill-down settings: Some custom visuals are designed to display additional categories when you drill down into the data. Check the drill-down settings to see if there is an option to display all categories. 

 

You can refer the following links to set the properties of visual.

Build a bar chart visual in Power BI - Power BI | Microsoft Learn

In addition, you can contact custom visual support team to get professional help.

Power BI Custom Visuals' Community

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.