cancel
Showing results for 
Search instead for 
Did you mean: 

% format Went haywire after publishing to Power BI Service

Hi all,

Not sure anyone encounters below, all the % went haywire once published to the Power BI service.

Also, the color theme went off.

I've tried republishing a few times, but it doesn't work.

I hope can get some guidance, thank you!

tomtang_0-1638875830611.png

 

 

(Left side is the power bi service while the right side is power bi desktop)

tomtang_1-1638875916040.png

 

Status: Investigating

Hi @tomtang 

 

May I know how you set colors for your visuals? Did you set them by visual format pane or other methods?

Could you please tell me the version of your Power BI Desktop and how you get these % values? Did you get them by any measures?

 

Best Regards,

Community Support Team _Caiyun

Comments
v-cazheng-msft
Community Support
Status changed to: Investigating

Hi @tomtang 

 

May I know how you set colors for your visuals? Did you set them by visual format pane or other methods?

Could you please tell me the version of your Power BI Desktop and how you get these % values? Did you get them by any measures?

 

Best Regards,

Community Support Team _Caiyun

tomtang
Helper III

Hi @v-cazheng-msft ,

  • Below is my desktop version.

 

tomtang_0-1638930088890.png

  • The % is directly from a measure.

 

At the same time, I am also trying to isolate the issue.

I have below findings so far:

  1. I am using Calculation Group to scale the measure. (e.g. scale the dollar value into absolute, thousands, or millions). I use that as a slicer to affect the measures on the whole page
  2. I found if I completely remove the slicer of this scaling calculation group, the % measure back to normal.
  3. Below is my DAX built in the calculation group 

 

VAR _SelectedItem =
    SELECTEDMEASURENAME () //Below are the measure won't be scaled
VAR _NWCDays =
    OR (
        CONTAINSSTRING ( _SelectedItem, "DSO" ),
        CONTAINSSTRING ( _SelectedItem, "DIO" )
            || CONTAINSSTRING ( _SelectedItem, "DPO" )
    )
VAR _Percentage =
    CONTAINSSTRING ( _SelectedItem, "%" )
VAR _RelativeVariance =
    CONTAINSSTRING ( _SelectedItem, "RelativeVar" )
VAR _PercentagePoint =
    CONTAINSSTRING ( _SelectedItem, "PercentagePoint" )
VAR _Rank =
    CONTAINSSTRING ( _SelectedItem, "Rank" )
VAR _DynamicText =
    CONTAINSSTRING ( _SelectedItem, "Dynamic" )
VAR _Result =
    IF (
        NOT OR (
            _NWCDays || _Percentage
                || _RelativeVariance,
            _PercentagePoint || _Rank
                || _DynamicText
        ),
        DIVIDE ( SELECTEDMEASURE (), 1000000 ),
        SELECTEDMEASURE ()
    )
RETURN
    _Result​

 

tomtang
Helper III

Hi @v-cazheng-msft 

 

Below is the snapshot referring to the slicer using the calculation group.

  1. No.1 is the comparison without (left) and with (right) the slicer
  2. No.2 is even after I removed the slicer, there's still 1 measure in % format is missing, this should look like in the 2nd snapshot
  3. I am only using a custom visual for the cards (card with states by OKViz). All the other visuals are Microsoft native visuals (e.g. matrix, line and clustered column chart)
  4. The color theme is not working is also due to the Power BI service can not identify the % measure with a valid value.

 

tomtang_0-1638930836203.png

 

tomtang_1-1638931027366.png

 

tomtang
Helper III

Hi @v-cazheng-msft,

 

Upon a few more tests and errors. 

 

I solve the issue, but I still can't figure out why it did work before, but not now. I just change the below DAX in my scaling calculation group.

 

Below is the old DAX in my scaling calculation group:

 

VAR _SelectedItem =
    SELECTEDMEASURENAME ()
//Below are the measure won't be scaled
VAR _NWCDays =
    OR (
        CONTAINSSTRING ( _SelectedItem, "DSO" ),
        CONTAINSSTRING ( _SelectedItem, "DIO" )
            || CONTAINSSTRING ( _SelectedItem, "DPO" )
    )
VAR _Percentage =
    CONTAINSSTRING ( _SelectedItem, "%" )
VAR _RelativeVariance =
    CONTAINSSTRING ( _SelectedItem, "RelativeVar" )
VAR _PercentagePoint =
    CONTAINSSTRING ( _SelectedItem, "PercentagePoint" )
VAR _Rank =
    CONTAINSSTRING ( _SelectedItem, "Rank" )
VAR _DynamicText =
    CONTAINSSTRING ( _SelectedItem, "Dynamic" )
RETURN
    SWITCH (
        TRUE (),
        _NWCDays, SELECTEDMEASUREFORMATSTRING (),
        _Percentage, SELECTEDMEASUREFORMATSTRING (),
        _RelativeVariance, SELECTEDMEASUREFORMATSTRING (),
        _PercentagePoint, SELECTEDMEASUREFORMATSTRING (),
        _Rank, SELECTEDMEASUREFORMATSTRING (),
        _DynamicText, SELECTEDMEASUREFORMATSTRING (),
        DIVIDE ( SELECTEDMEASURE (), 1000000 )
    )

 

 

 

Below is the new DAX in my scaling calculation group:

 

VAR _SelectedItem =
    SELECTEDMEASURENAME ()
//Below are the measure won't be scaled
VAR _NWCDays =
    OR (
        CONTAINSSTRING ( _SelectedItem, "DSO" ),
        CONTAINSSTRING ( _SelectedItem, "DIO" )
            || CONTAINSSTRING ( _SelectedItem, "DPO" )
    )
VAR _Percentage =
    CONTAINSSTRING ( _SelectedItem, "%" )
VAR _RelativeVariance =
    CONTAINSSTRING ( _SelectedItem, "RelativeVar" )
VAR _PercentagePoint =
    CONTAINSSTRING ( _SelectedItem, "PercentagePoint" )
VAR _Rank =
    CONTAINSSTRING ( _SelectedItem, "Rank" )
VAR _DynamicText =
    CONTAINSSTRING ( _SelectedItem, "Dynamic" )
RETURN
    SWITCH (
        TRUE (),
        _NWCDays, SELECTEDMEASURE (),
        _Percentage, SELECTEDMEASURE (),
        _RelativeVariance, SELECTEDMEASURE (),
        _PercentagePoint, SELECTEDMEASURE (),
        _Rank, SELECTEDMEASURE (),
        _DynamicText, SELECTEDMEASURE (),
        DIVIDE ( SELECTEDMEASURE (), 1000000 )
    )