Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
tomtang
Helper III
Helper III

% 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!😀

 

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

tomtang_1-1638873572338.png

 

1 ACCEPTED SOLUTION
tomtang
Helper III
Helper III

Hi,

 

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. It's mainly caused by my scaling calculation group, so my solution is just to 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 )
    )

 

View solution in original post

3 REPLIES 3
tomtang
Helper III
Helper III

Hi,

 

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. It's mainly caused by my scaling calculation group, so my solution is just to 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 )
    )

 

amitchandak
Super User
Super User

@tomtang , Clear browser cache, refresh and try.

Republish -> Clear browser cache, refresh and try.

 

if this does not resolve, you might have to log an issue

@amitchandak Thanks for the response, I've tried to republish and clear the cache, also refreshed again in the app and report. Still not working!

Thank you so much!

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.