Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Scatter Chart -- Dynamic formulas not working



I want to create dynamic scatter chart. that means, Based on Slicer selection X-Axis measure, Y-Axis measure should change automatically


X_axis_measure = IF(SELECTEDVALUE('X axis_Table'[X axis])="Total Customer",[total customer],IF(SELECTEDVALUE('X axis_Table'[X axis])="Total Products",[Total Products],if(SELECTEDVALUE('X axis_Table'[X axis])="Total Quantity",[Total Quantity],if(SELECTEDVALUE('X axis_Table'[X axis])="Total Profit", [Total Profit],if(SELECTEDVALUE('X axis_Table'[X axis])="Total Sales",[Total Sales])))))
Y_axis_measure = IF(SELECTEDVALUE('Y axis_table'[Y Axis])="Total Customer",[total customer],IF(SELECTEDVALUE('Y axis_table'[Y Axis])="Total Produts",[Total Products],if(SELECTEDVALUE('Y axis_table'[Y Axis])="Total Quantity",[Total Quantity],if(SELECTEDVALUE('Y axis_table'[Y Axis])="Total Profit",[Total Profit], if(SELECTEDVALUE('Y axis_table'[Y Axis])="Total Sales",[Total Sales])))))
X_axis = IF(SELECTEDVALUE('X axis_Table'[X axis]),[X_axis_measure])
Y_axis = IF(SELECTEDVALUE('Y axis_table'[Y Axis]),[Y_axis_measure])
in Scatter Chart :
X-Axis  ---> X_axis
Y-Axis  ---> Y_axis
Values ---> US State
Legend ---> Region
 By using above measures, iam getting this error ------- "Cannot convert value of type text to type True/False. 
 Please help!
Super User
Super User

@b_raj_kumar , My advice would be to use a new field parameter feature and create to measure slicer

Power BI Features || Datamarts: || Field Parameters :
Time Intelligence Decoded :
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!
Want To Learn Power BI | Beginners !! Advance Concepts !! Power BI For Tableau User !!

Helpful resources

August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors