Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Ok, here is the problem, I think this is easy but just didn't figure out the solution by myself.
I have two tables, which are related by Object. My problem is TABLE 1.
In TABLE 1 the Object can get four kind of status:
1. Applied
2. Viewed
3. Approved OR Rejected
I would like to add a column to TABLE 1 (green RESULT column below) which gives the number 3. result for all rows within the same Object. So when I select an object in visualization, it gives me immediately the information if the Object is Approved or Rejected. I could also use that as a filter to search rejected objects.
Any ideas? Thank you!
/Theiren
Solved! Go to Solution.
This is the correct code. Your code should be avoided because it's using CALCULATE in a calculated column and this - as is known - generates a lot of context transitions that slow down the code.
[Final Result] = -- calculated column var __object = T1[Object] var __hasBeenApproved = NOT ISEMPTY( FILTER ( T1, T1[Object] = __object && T1[Result] = "approved" ) ) retun if( __hasBeenApproved, "Approved", "Rejected" )
Best
Darek
[Final Result] = -- calculated column var __object = T1[Object] var __hasBeenApproved = NOT ISEMPTY( T, T1[Object] = __object && T1[Result] = "approved" ) retun if( __hasBeenApproved, "Approved", "Rejected" )
Best
D.
Thank you for your swift reply @Anonymous ! Function ISEMPTY seems to take only "Table" as a parameter, is there a typo in your dax?
/Theiren
This is the correct code. Your code should be avoided because it's using CALCULATE in a calculated column and this - as is known - generates a lot of context transitions that slow down the code.
[Final Result] = -- calculated column var __object = T1[Object] var __hasBeenApproved = NOT ISEMPTY( FILTER ( T1, T1[Object] = __object && T1[Result] = "approved" ) ) retun if( __hasBeenApproved, "Approved", "Rejected" )
Best
Darek
Thank you @Anonymous !!! It works now and I marked your reply as a solution. I am not prof enough to understand which actions slow down the code.
I also solved the slicer problem. For some reason if I used this new column as a slicer, it didn't work how I wanted (with info from other table), but when I brought the result to another table (where is only one object per row) it started to work. Thank you anyway! 🙂
/Theiren
I created the following DAX:
ResultColumn =
var approved =
CALCULATE(COUNTROWS(TABLE1),
FILTER(TABLE1, EARLIER(TABLE1[OBJECT]) = TABLE1[OBJECT] && TABLE1[STAT] = "I6789"))
return
IF(approved > 0, "Approved", "Rejected")This gives me the result I was hoping to get. BUT, I am still wondering how to create a slicer of this (i.e. if I want to see only rejected objects). Anyway, I will close this thread now and maybe return the second issue later if needed.
/Theiren
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 19 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 32 | |
| 20 | |
| 12 | |
| 11 |