Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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.
Solved! Go to Solution.
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
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
| User | Count |
|---|---|
| 58 | |
| 46 | |
| 31 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 77 | |
| 66 | |
| 46 | |
| 22 | |
| 22 |