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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
the75th
Regular Visitor

Making this more concise

Hey guys, I've (nearly) finished a model and I'm looking to make the queries more concise and improve the performance. Essentially what it does is the following: 8 columns over 2 tables ( 4 and 4) I need to compare them with each other and visualize the difference in the strings So I used this function in a calculated column IF(isblank(Column1) = true; blank(); if(Column1 = related(Column1');1;0) for each column. (Many values are blank and I don't want to be comparing those) Now, the thing is that the comparison is pretty all or nothing. As soon as ANY column has a '0' the entire record should be 0. So I wrote something along the lines of: IF(Column 1 <> 1 || column 2 <>1 || column 3 <> 1 || column 4 <>1;0;1) Just this final function is failing me. How would you guys solve this problem? Also I can't provide sampels or screenshots as the database contains personal information. I could however create a mock-up when I get home if it's necessary.

1 ACCEPTED SOLUTION
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @the75th

 

You may try to use below measure. If it is not your case, please share a simplified data sample and expected output.

 

Column  =
IF (
    SELECTEDVALUE ( Table3[Column1] ) = 0
        || SELECTEDVALUE ( Table3[Column2] ) = 0
        || SELECTEDVALUE ( Table3[Column3] ) = 0,
    0,
    1
)

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @the75th

 

You may try to use below measure. If it is not your case, please share a simplified data sample and expected output.

 

Column  =
IF (
    SELECTEDVALUE ( Table3[Column1] ) = 0
        || SELECTEDVALUE ( Table3[Column2] ) = 0
        || SELECTEDVALUE ( Table3[Column3] ) = 0,
    0,
    1
)

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
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.