Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

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.

  • v-viig's avatar
    v-viig
    8 years ago

    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

    [email protected]

7 Replies

  • v-viig's avatar
    v-viig
    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

    [email protected]

     

    • Anonymous's avatar
      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's avatar
        v-viig
        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

        [email protected]