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
Anonymous
Not applicable

Specifying the order for data roles

In our visual we are using "Grouping" data role as well as "GroupingOrMeasure" data role. If I user adds a grouping field (for example "Fiscal month" from the Retail Analyis demo) it goes directly to the "GroupinOrMeasure" field.

 

Is there any way to tell the visual to first use the "Grouping" data role and only after that use the "GroupingOrMeasure"? I didn't find anything in the documentation and also the order of the data roles in the capabilities.json does not seem to matter.

1 ACCEPTED SOLUTION
v-viig
Community Champion
Community Champion

Looks like it's impossible to achieve since Power BI Desktop that you use is out dated.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

View solution in original post

7 REPLIES 7
v-viig
Community Champion
Community Champion

You might specify conditions for the data-fields to fill field in the proper order (example).

@Anonymous Could you please share your capbilities.json for futher investigation?

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

 

Anonymous
Not applicable

I think I managed to make it work. I had a condition for the GroupOrMeasure field, but not for the Groupping field. Once I added conditions for the Groupping field as well it works as planned (at least in the latest version of Power BI Desktop, some older ones work differently).

 

Is there any specification in what order do the fields get filled? Are you maybe considering adding some options for the developers of the custom visual to specifiy the order?

v-viig
Community Champion
Community Champion

There's no specification but the order can be controlled by adding rules to the conditions of your capabilities.json.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Anonymous
Not applicable

It does work for certain cases but not for all. For example I tried using the same condition in capabilities.json but I used two different clients (Power BI Desktop for Report server June 2017 and Power BI desktop December 2017) and they work differently. So I guess something changed in the newer version that makes it work differently even though the whole capabilities file is the same.

v-viig
Community Champion
Community Champion

Can you share your capabilities.json to check the issue from our side?

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Anonymous
Not applicable

Sure, here's an example capabilities file (you can use the whole repo if you wish, it's just a new visual with some added capabilities).

 

If I use this visual on Power BI online and add two value fields I get this.

 

However, if I do this exact same thing in the Power BI Desktop for Report Server June 2017 I get this.

 

I want to be able to add up to 4 value fields in each of them, but I want the first one to go to the first field and the second one to go to the second field, just like it works online. But I'm not able to achieve this of the desktop version. I also tried adding contstraits, but setting min 0 max 4 does not solve this problem the functinality stays the same.

v-viig
Community Champion
Community Champion

Looks like it's impossible to achieve since Power BI Desktop that you use is out dated.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

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.

Top Solution Authors