PowerPivot doesn't recognize SWITCH syntax

Anything related to PowerPivot and DAX Formuale
Posts: 1
Joined: Wed Jun 09, 2021 9:28 pm

PowerPivot doesn't recognize SWITCH syntax

Postby george » Wed Jun 09, 2021 11:22 pm


I have encountered an error for the previously working solution with the SWITCH formula. It worked perfectly several years ago.

The formula is the following: NameOfSelectableMeasure:=SWITCH ( [MeasureSelector], 1, [Sales Value, mln UAH], 2, [Sales Volume, SU], 3, [WTD],4,[Price per diaper],5,[Value Share],6,[Volume Share] )

When I try to change the formula or just press enter on it, PowerPivot returns the following error:

The expression is not valid or appears to be incomplete. Please review and correct the expression.

So it looks like some syntax problem. Trying to track syntax step by step, I see that it doesn't recognize the Value when I input it as a number. For example, if I try to enter it as a text like "1" then it allows to enter the formula.

What can be wrong with it?

Return to “PowerPivot/DAX”

Who is online

Users browsing this forum: No registered users and 5 guests