Forum Discussion

v-mubish's avatar
v-mubish
Icon for Helper I rankHelper I
9 years ago
Solved

Different Behaviour of Custom Visual in Power BI Service and Desktop

Hi,

 

Trying to achieve a custom table visual. My dataset looks like-:

 

I am fetching format from options.dataview for columns. The diff. formats i got from datview in PBI service are-:

for "$" -> ""$"#,##0;\("$"#,##0\)"

for "%" -> "0%"

for hour -> "%h:mm tt"

 

so based on format i am prefixing/suffixing the symbol with cell element when I am printing the table. Works fine in PBI Service

 

but Desktop is giving some unexpected output.

(adding dollar sign with each cell's element)

Note-: here i have formatted hours as "time" from modelling pane.

 

A helping hand is appreciated. 

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

    Hello v-mubish,

     

    Could you please install @types/d3@3.5.36 (npm i @types/[email protected] --save) and try to build the visual again?

    Please pay attention to the fact that you should execute all of commands in the visual's directory.

     

    Ignat Vilesov,

    Software Engineer

     

    Microsoft Power BI Custom Visuals

    [email protected]

     

     

8 Replies

    • v-mubish's avatar
      v-mubish
      Icon for Helper I rankHelper I

      Hi v-viig,

       

      I am not using any formatting utility like formatting-utils or any other, and powerBI shows data type "whole number" for each column except date/time column i.e. "Hour".

       

      One thing i observed, when we are changing type or format from modelling pane in PBI Desktop, that format is getting reflected in built-in table visual. But these changes when I am doing, are not getting reflected in my Custom visual.

       

      How to reslove this?