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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. 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

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

@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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.