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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Sedos101
Helper I
Helper I

Web2 error

Hi everyone

 

Trying to copy and paste into this formula into DAX and powerBI keeps crashing, I can't even type it in...

 

HRI_ =
IF (
MAX ( Data[MANAGEMENT_PT] = 0 ),
1,
(
IF (
MAX ( Data[MANAGEMENT_PT] = 1 )
|| MAX ( Data[MANAGEMENT_PT] = 2 ),
2,
(
IF (
MAX ( Data[MANAGEMENT_PT] = 3 )
|| MAX ( Data[MANAGEMENT_PT] = 4 ),
3,
(
IF (
MAX ( Data[MANAGEMENT_PT] = 5 )
|| MAX ( Data[MANAGEMENT_PT] = 6 ),
4,
(
IF (
MAX ( Data[MANAGEMENT_PT] = 7 )
|| MAX ( Data[MANAGEMENT_PT] = 8 ),
5,
(
IF (
MAX ( Data[MANAGEMENT_PT] = 9 )
|| MAX ( Data[MANAGEMENT_PT] = 10 ),
6,
(
IF (
MAX ( Data[MANAGEMENT_PT] >= 11 )
&& MAX ( Data[MANAGEMENT_PT] <= 13 ),
7,
(
IF (
MAX ( Data[MANAGEMENT_PT] >= 14 )
&& MAX ( Data[MANAGEMENT_PT] <= 16 ),
8,
(
IF (
MAX ( Data[MANAGEMENT_PT] >= 17 )
&& MAX ( Data[MANAGEMENT_PT] <= 19 ),
9,
(
IF (
MAX ( Data[MANAGEMENT_PT] >= 20 ),
10,
(
IF (
MAX ( Data[MANAGEMENT_PT] = 1 )
|| MAX ( Data[MANAGEMENT_PT] = 2 )
|| MAX ( Data[WARNING_PT] = 1 ),
2,
(
IF (
MAX ( Data[MANAGEMENT_PT] = 3 )
|| MAX ( Data[MANAGEMENT_PT] = 4 )
|| MAX ( Data[WARNING_PT] = 2 ),
3,
(
IF (
MAX ( Data[MANAGEMENT_PT] = 5 )
|| MAX ( Data[MANAGEMENT_PT] = 6 )
|| MAX ( Data[WARNING_PT] = 3 ),
4,
(
IF (
MAX ( Data[MANAGEMENT_PT] = 7 )
|| MAX ( Data[MANAGEMENT_PT] = 8 )
|| MAX ( Data[WARNING_PT] >= 4 )
&& MAX ( Data[WARNING_PT] <= 6 ),
5,
(
IF (
MAX ( Data[MANAGEMENT_PT] = 9 )
|| MAX ( Data[MANAGEMENT_PT] = 10 )
|| MAX ( Data[WARNING_PT] >= 7 )
&& MAX ( Data[WARNING_PT] <= 9 ),
6,
(
IF (
MAX ( Data[MANAGEMENT_PT] >= 11 )
&& MAX ( Data[MANAGEMENT_PT] <= 13 )
|| MAX ( Data[WARNING_PT] >= 10 )
&& MAX ( Data[WARNING_PT] <= 12 ),
7,
(
IF (
MAX ( Data[MANAGEMENT_PT] >= 14 )
&& MAX ( Data[MANAGEMENT_PT] <= 16 )
|| MAX ( Data[WARNING_PT] >= 13 )
&& MAX ( Data[WARNING_PT] <= 15 ),
8,
(
IF (
MAX ( Data[MANAGEMENT_PT] >= 17 )
&& MAX ( Data[MANAGEMENT_PT] <= 19 )
|| MAX ( Data[WARNING_PT] >= 16 )
&& MAX ( Data[WARNING_PT] <= 18 ),
9,
(
IF (
MAX ( Data[MANAGEMENT_PT] >= 20 )
|| MAX ( Data[WARNING_PT] >= 19 ),
10,
(
IF (
MAX ( Data[MANAGEMENT_PT] >= 14 )
&& MAX ( Data[MANAGEMENT_PT] <= 16 )
|| MAX ( Data[WARNING_PT] >= 13 )
&& MAX ( Data[WARNING_PT] <= 15 )
|| MAX ( Data[ACTION_PT] >= 1 )
&& MAX ( Data[ACTION_PT] <= 3 ),
8,
(
IF (
MAX ( Data[MANAGEMENT_PT] >= 17 )
&& MAX ( Data[MANAGEMENT_PT] <= 19 )
|| MAX ( Data[WARNING_PT] >= 16 )
&& MAX ( Data[WARNING_PT] <= 18 )
|| MAX ( Data[ACTION_PT] >= 4 )
&& MAX ( Data[ACTION_PT] <= 6 ),
9,
(
IF (
MAX ( Data[MANAGEMENT_PT] >= 20 )
|| MAX ( Data[WARNING_PT] >= 19 )
|| MAX ( Data[ACTION_PT] >= 7 ),
10,
0
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)

1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

Hi @Sedos101 ,

Your dax statement is too cumbersome, thus causing the error. Referring to below, I copied some of the code in and to the naked eye, it gets more and more jerky as the code grows. Try to optimize your code and try again, you can use SWITCH instead of IF to use.

vluwangmsft_0-1665542952892.png

 

 

Best Regards

Lucien

 

View solution in original post

1 REPLY 1
v-luwang-msft
Community Support
Community Support

Hi @Sedos101 ,

Your dax statement is too cumbersome, thus causing the error. Referring to below, I copied some of the code in and to the naked eye, it gets more and more jerky as the code grows. Try to optimize your code and try again, you can use SWITCH instead of IF to use.

vluwangmsft_0-1665542952892.png

 

 

Best Regards

Lucien

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.