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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

How To Get X/Y Position Of Visual

Hello!

 

I'm relatively new to PowerBI, and I was wondering if its possible to get the X/Y Position of a card in DAX (see photo attached). I need to create a function so that if the visual is within a pre drawn box, the box will change colour, kindof similar to a map. 

Any help is appreciated! Thank you : )

serenap_0-1647437780957.png

 

6 REPLIES 6
Anonymous
Not applicable

Yup, so I was thinking a user would edit the report by just dragging the visual around, as each day, A and B will move to a new box or back to an old box. All other content would be computer generated. Do you think it would be possible to execute something like that with PowerBI? Thanks!

There might be some custom visual that has a click and drag interface but I don't know of one personally. Otherwise, I think you'll have to adjust how interaction works and use slicers instead.

AlexisOlson
Super User
Super User

I don't think it is feasible to do exactly what you're suggesting but there might be some sort of workaround. Can you show an example of how you'd expect it to look?

Anonymous
Not applicable

Hi Alexis, 

 

Thanks for getting back to me! The photo attached might help a bit in terms of what I'm hoping to get working.

So in the first box, I want cards A and B to make up the current value (106) because they're within the box dimensions, but when B is pulled out of the box (seen in the second box), the current sum is only card A.

Originally, I was going to create a measure that will take into account the x and y positions of the card relative to the boxes, but I can't seem to find a function that retrieves those positions. 

Any suggestions are greatly appreciated! Thanks.

serenap_0-1647442951682.png

 

Interesting concept but I don't know how it would work since you can only move the visuals around when you're editing the report, not when the end-user views it (and I'm assuming B 31 is in its own card-like visual).

 

However, you could control the contents of the box using a slicer instead of dragging pieces around.

Anonymous
Not applicable

Ah I understand. I was thinking that someone would edit the PowerBI and move the visuals around, but all the other numbers would be generated based on edits to the report. Do you think this might be possible? 

A slicer might not be feasible, as the example I produced is a much smaller scale of the actual tool being produced. 

Thank you!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.