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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
adarshsada
Frequent Visitor

Assigning a calculated column as field value

Hi everyone, 

 

I currently have a Rhino model (2D surface divided into multiple sections as seen in the below image) and I'm using it's object ID to control each section. 

adarshsada_0-1762858254414.png

What Im trying to do now is with a calculated column which has an already specified color value and assign it to the above sections. However, when I try to assign this color column as a filed value, it only considered the "last or first" value and doesnt dynamically assign the color values. 

adarshsada_1-1762858708251.png

 



This is the formula for the calculated column (SG is another column in the same table)

COL2_col =
VAR _gain = 'Test (2)'[SG]
RETURN
SWITCH(
    TRUE(),
    ISBLANK(_gain), "#FFFFFF",     
    _gain = 0, "#FFFFFF",              
    _gain <= 40, "#9ECF84",         
    _gain > 40 && _gain <= 40 + 5, "#FEC20E",  
    _gain > 40 + 5, "#DD5529",     
    "#FFFFFF"                            
)

Thanks in advance, 
 
Best, 
A
1 ACCEPTED SOLUTION

Hi @PhilipTreacy ,

This happens because the 3D visual is not passing the Obj ID filter to the other visuals. For the rectangles to respond correctly, both visuals must use the same Obj ID field, and the model must allow the filter to flow between them.

Confirm both visuals use the same Obj ID. The rectangles visual uses Rose Chart[Obj ID]. The 3D visual uses Rhino[Obj ID], these need to represent the same IDs, otherwise no cross-filtering can occur.

Check the data model relationship. Make sure there is a relationship between:
Rhino[Obj ID] → Rose Chart[Obj ID]
If this relationship does not exist, or is inactive, then clicking the 3D model will not filter the rectangles.

Enable visual interactions. Even if the relationship exists, Power BI might be blocking interaction between the visuals.

Select the 3D visual
Go to Format → Edit interactions
Ensure the rectangles visual is set to Filter (not “None” or “Highlight”)
This ensures the 3D model can send filters to the rectangles visual.

Hope this helps.
Thank you.

View solution in original post

10 REPLIES 10
v-echaithra
Community Support
Community Support

Hi @adarshsada ,

May I ask if you have resolved this issue? Please let us know if you have any further issues, we are happy to help.

Thank you.

v-echaithra
Community Support
Community Support

Hi @PhilipTreacy ,

Thank you @DataNinja777  for your inputs.

I just wanted to check if the issue has been resolved on your end, or if you require any further assistance. Please feel free to let us know, we’re happy to help!


Thank you 
Chaithra E.

 

DataNinja777
Super User
Super User

Hi @adarshsada ,

 

You can achive your required output by using a measure to assign color dynamically instead of the calculation column which can only pre-calculate the value.  You can write a measure like below:

Color_Measure = 
VAR _gain = SELECTEDVALUE('Table'[SG])
RETURN
SWITCH(
    TRUE(),
    ISBLANK(_gain) || _gain = 0, "#FFFFFF",
    _gain <= 40, "#9ECF84",
    _gain <= 45, "#FEC20E",
    "#DD5529"
)

 Then you can assign that measure in the fill section of the shape visual.  

 

DataNinja777_1-1764168766296.png

 

This ensures your shape color is dynamically switchable by slicer selections.  

 

I have attached an example pbix file for your reference.

 

Best regards,

 

v-echaithra
Community Support
Community Support

Hi @adarshsada ,

Thank you @adarshsada  for your inputs.

Just following up to see if the Response provided by community members were helpful in addressing the issue. if the issue still persists Feel free to reach out if you need any further clarification or assistance.


Best regards,
Chaithra E.



Hi @v-echaithra,

I still havent been able to find a fix to my issues, unfortunately. It would be great if you could check my .PBIX file and let me know if I'm doing something wrong. 

 

Best regards,

A

adarshsada
Frequent Visitor

Hi @PhilipTreacy and all,

 

I'm reopening this issue as I believe these's a better way of solving the problem instead of adding a button slicer. I've linked my powerBI file as well ( https://www.swisstransfer.com/d/b3e47656-e9e1-435b-b1e7-e3d0603f5926 ). 
What I'm trying to do is trying to control the retangle using the 3D model (windows) but it does not change dynamically. 

adarshsada_0-1763539933792.png


However, it works when I have a button slicer with the ID names. 

adarshsada_1-1763539965248.png

This is good for a small number of ID's but isn't logical when I have alot of them. Is there a way to make it work by selecting the "ID's" in my 3D model?

 

Hi @PhilipTreacy ,

This happens because the 3D visual is not passing the Obj ID filter to the other visuals. For the rectangles to respond correctly, both visuals must use the same Obj ID field, and the model must allow the filter to flow between them.

Confirm both visuals use the same Obj ID. The rectangles visual uses Rose Chart[Obj ID]. The 3D visual uses Rhino[Obj ID], these need to represent the same IDs, otherwise no cross-filtering can occur.

Check the data model relationship. Make sure there is a relationship between:
Rhino[Obj ID] → Rose Chart[Obj ID]
If this relationship does not exist, or is inactive, then clicking the 3D model will not filter the rectangles.

Enable visual interactions. Even if the relationship exists, Power BI might be blocking interaction between the visuals.

Select the 3D visual
Go to Format → Edit interactions
Ensure the rectangles visual is set to Filter (not “None” or “Highlight”)
This ensures the 3D model can send filters to the rectangles visual.

Hope this helps.
Thank you.

Hi @v-echaithra,

Thank you so much! The interaction between the rectangle and the 3D model was set to Highlight and hence it wasn't working. Now that I set it to Filter, it works as it should. The issue is now solved. I really appreciate your help.

 

Best,

A

Hi @adarshsada ,

Thank you for confirming that issue has been resolved. If further assistance is still required. We are available to support you and are committed to helping you reach a resolution.

Best Regards,
Chaithra E.

PhilipTreacy
Super User
Super User

@adarshsada 

 

You need to create a measure to assign colors in this way.  But I'm not following what you are trying to do and don't have your data.  Please supply sample data - preferably your PBIX file.

 

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.