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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Artefact
Helper II
Helper II

Extra parenthesis added after saving file

Hi,

Sometimes PBI adds a lot of extra parenthesis at the end of a DAX formula. Till now after copy paste the formula they don't show up again. But now PBI keeps adding them and returns an error on the formula. But only when I save the PBIX! So when applying the formula, it works fine, but after saving the file, PBI returns "hey your forumula has 3 extra parenthesis which don't belong there". 

And trust me , there's noting wrong with the formula, it works fine before saving. The error message shows 2 more parenthesis at the end, which PBI keeps adding when saving. And when I delete the last parenthesis in my formula, PBI just adds one more.

 

IF (
    OR (
        AND ( AVERAGE ( workorder_time[Age in years] ) > 29, [Total spent time] > 55 ),
        AND ( AVERAGE ( workorder_time[Age in years] ) < 30, [Total spent time] > 50 )
    ),
    "#4287f5"
)

 Result when saving :

IF <same formula>

"#4287f5"  ))) (2 too many)



2 REPLIES 2
artefarct
New Member

Hello Bhanu,

Thank for your quick reply. But I get the same error when saving. Keeps adding extra parenthesis .

bhanu_gautam
Super User
Super User

@Artefact , Try using Variables

 

VAR AgeAverage = AVERAGE(workorder_time[Age in years])
VAR TotalSpent = [Total spent time]
RETURN
IF (
OR (
AND (AgeAverage > 29, TotalSpent > 55),
AND (AgeAverage < 30, TotalSpent > 50)
),
"#4287f5"
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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