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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
trevorw1329
Regular Visitor

Inconsistent Calculation from selectedvalue function

I am using a selectedvalue formula that takes lat and longitude values and plugs them into my calculation. I created fields to ensure the function called the correct values and it did. However, when my other calculated field uses these values which should be the same it doesn't respond. If I plug in the numbers themselves, instead of using the selectedvalue function, it works properly so I know it shouldn't be the calculation itself that's the issue. But my other fields show that the selectedvalue formula should be returning the correct values. As shown below, the bottom right chart is not responding properly.Screenshot 2022-08-04 134808.pngScreenshot 2022-08-04 140131.pngThis is what the bottom right chart looks like with the variables manually set which is what I want

.Screenshot 2022-08-04 143329.png

2 REPLIES 2
trevorw1329
Regular Visitor

Update: when I show the chart as a table, it seems to be working correctly, so why is the chart not working?Screenshot 2022-08-04 144209.png

Anonymous
Not applicable

HI @trevorw1329,

In fact, selectedvalue function does not suitable to handle aggregate row contexts. You can add 'alternate result' option to handle these aggregate multiple rows.

In addition, what type of calculated field are you work? If you mean calculated column, current power bi does not support creating dynamic calculated column/table based on filter selections. They work on different levels and I'd like to suggest you use measure expression instead.

Notice: the data level of power bi(from parent to child level) 

Database(external) -> query table(query, custom function, query parameters) -> data model table(table, calculate column/table) -> data view with virtual tables(measure, visual, filter, slicer) 

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.