Flori_Abb's avatar
Flori_Abb
Icon for Helper I rankHelper I
9 years ago
Status:
Needs Info

MdxScript(Model) (108, 2) error with switch button in Power BI Service (no Problem in PBI Desktop)

Hi all

 

there is something weird happening in Power BI online. I upload every day a new sales report to our PBI Workspace and that has worked without problems the last 12 months! Since yesterday i get in Power BI Online follwing error message with one of my reports:


 

In the Desktop Version it still works without problems:

 

 

So i am wondering what causes the error now in Power BI Service?

 

Regards

 

Florian

6 Comments

  • v-haibl-msft's avatar
    v-haibl-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Flori_Abb

     

    What the DAX formula of measure '03_technical_Measure'[var_mqplanrev USD]? From the error message, it seems that the type of this measure is Text which should be corrected. You can try to change the type to whole number or decimal number.

     

    Best Regards,
    Herbert

  • Hi Herbert

    the formula is

    var_mqplanrev USD = Switch( True();
    dim_measureswitch[Measure Selection] = "Month" && dim_version[Version selection] = "Plan"; Data_LBE_PLAN[MTD Plan Rev USD];
    dim_measureswitch[Measure Selection] = "Quarter" && dim_version[Version selection] = "Plan"; [QTD Plan Rev USD];
    dim_measureswitch[Measure Selection] = "Month" && dim_version[Version selection] = "LBE1"; Data_LBE_PLAN[MTD LBE1 Rev USD];
    dim_measureswitch[Measure Selection] = "Quarter" && dim_version[Version selection] = "LBE1"; [QTD LBE1 Rev USD];
    dim_measureswitch[Measure Selection] = "Month" && dim_version[Version selection] = "LBE2"; Data_LBE_PLAN[MTD LBE2 Rev USD];
    dim_measureswitch[Measure Selection] = "Quarter" && dim_version[Version selection] = "LBE2"; [QTD LBE2 Rev USD];
    dim_measureswitch[Measure Selection] = "Month" && dim_version[Version selection] = "LBE3"; Data_LBE_PLAN[MTD LBE3 Rev USD];
    dim_measureswitch[Measure Selection] = "Quarter" && dim_version[Version selection] = "LBE3"; [QTD LBE3 Rev USD];
    dim_measureswitch[Measure Selection] = "Month" && dim_version[Version selection] = "LBE4"; Data_LBE_PLAN[MTD LBE4 Rev USD];
    dim_measureswitch[Measure Selection] = "Quarter" && dim_version[Version selection] = "LBE4"; [QTD LBE4 Rev USD];
    blank())

     

    It has worked nicely until tuesday, after that it shows this error message in PBI Service. In the desktop it still works...

    Thanks a lot and KR

     

    Florian

  • v-haibl-msft's avatar
    v-haibl-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Flori_Abb

     

    What is the data type of this measure? If it is Text, have you tried to change it to Whole Number or Decimal Number?

     

    Best Regards,
    Herbert

  • The data type is decimal number and percentage. The really strange thing is that it works in the desktop without problems. Also in Power BI Service there was no issue for 10 months until two weeks ago.