Forum Discussion

RichardL's avatar
RichardL
Microsoft Employee
8 years ago
Solved

Imported Data Not Stored Correctly in dataViews[0]

I have a custom visual that reads in data from three columns in Excel into a table.  My test columns look like this:

 

  A  |  B  |   C

-------------------

  0  |     | Name0

  1  |  0  | Name1

  2  |  1  | Name2

  3  |  2  | Name3

  4  |  3  | Name4

  5  |  4  | Name5

 

In the dataRoles section of capabilities.json, the kind for the three data fields is declared as "GroupingOrMeasure". 

 

When I inspect dataViews[0].table.rows in the developer panel of my browser, all data values for column A are 1's.  One row of column B contains a 'null', which is correct.  However, the rest of the rows contain 1's.  All strings for column C are correct. 

 

This is how the data looks in dataViews[0].table:

 

  A  |  B   |   C

--------------------

  1  | null | Name0

  1  |   1  | Name1

  1  |   1  | Name2

  1  |   1  | Name3

  1  |   1  | Name4

  1  |   1  | Name5

 

I am on API 1.8.0 and don't recall running into this problem with earlier API's.

 

Any ideas?  Thanks.

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

    Hi RichardL,

     

    Thank you reaching us out.

    Since all of numeric columns are declared as GroupingOrMeasure the user must select “Don’t summarize” for each measure column (default behavior is Count).

     

    As an alternative solution you should use Measure instead of GroupingOrMeasure for numeric columns.

     

     

    Ignat Vilesov,

    Software Engineer

     

    Microsoft Power BI Custom Visuals

    [email protected]

  • Thanks Ignat.  Switching to Measure in the capabilities.json didn't seem to work for me.  However, manually select "Don't summarize" for each measure column in Power BI Desktop did seem to fix the issue.  Too bad it's not the default, and I never had to manually do this in previous versions of PBI Desktops or custom visual API's.

4 Replies

  • v-viig's avatar
    v-viig
    Community Champion

    Can you share your data-set and your custom visual for further debugging?

     

    Ignat Vilesov,

    Software Engineer

     

    Microsoft Power BI Custom Visuals

    [email protected]

      • v-viig's avatar
        v-viig
        Community Champion

        Hi RichardL,

         

        Thank you reaching us out.

        Since all of numeric columns are declared as GroupingOrMeasure the user must select “Don’t summarize” for each measure column (default behavior is Count).

         

        As an alternative solution you should use Measure instead of GroupingOrMeasure for numeric columns.

         

         

        Ignat Vilesov,

        Software Engineer

         

        Microsoft Power BI Custom Visuals

        [email protected]