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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Calculated column from selected value

HI Team,

I'm facing an issue like, i'm want to create a column based on threshold value and placed in Scatted chart based on their values.

Profit_Threshold value: i'm using generateseries function to get this.
Sales_threshold value:-  i'm using generateseries function to get this.
Sales_Value: - Sum(sales).
Profit_Value:- Sum(Profit)
 I have created calculated column like this,

Quadrant_Column:-  if(Sales_value > SelectedValue(Sales_Threshold Value) && Profit_Value > SelectedValue(Profit_Threshold Value), "Top Performers", if(Sales_value < SelectedValue(Sales_Threshold Value) && Profit_Value < SelectedValue(Profit_Threshold Value), "Under Performers","Average Performer")))

Above calculated column is not working.


Prasad_78_0-1720505444094.png

 Using in Scatted Chart.

Could you please help me to get  this.

 

Regards,
Prasad_78





1 ACCEPTED SOLUTION

@Anonymous 

Yes, you can only use a column in the legends field, so a measure will not work.

Maybe having a dis-jointed table with your possible measure results might work, can you share the pbix? to make some tests. It's too difficult to reproduce your case.

 

BBF

View solution in original post

15 REPLIES 15
BeaBF
Super User
Super User

@Anonymous If you want a formula that changes dynamically with the selection in slicer, you need to use a measure.

 

BBF

Anonymous
Not applicable

@BeaBF  Thank you. But that created one we are using as  legend so that's why we are creating a column instead of Measure.

Regards,
Prasad_78

@Anonymous 

Yes, you can only use a column in the legends field, so a measure will not work.

Maybe having a dis-jointed table with your possible measure results might work, can you share the pbix? to make some tests. It's too difficult to reproduce your case.

 

BBF

Anonymous
Not applicable

@BeaBF  I didn't see any option to upload pbix file. 
Here is the sample data for my requirement.
CustomerSalesRevenueLegends

CustomerSalesRevenue
AB1254
BC2164
CD3174
DE4123
EF5111

 

Legends = if(Sum('Table'[Sales])> SELECTEDVALUE(Sales[Sales]) && Sum('Table'[Revenue])> SELECTEDVALUE(Revenue[Revenue]),"Top",if(Sum('Table'[Sales])< SELECTEDVALUE(Sales[Sales]) && Sum('Table'[Revenue])< SELECTEDVALUE(Revenue[Revenue]),"Below","Average"))
 

@Anonymous ok, and how is construct your visual? X axis, Y axis, ecc.
Also, Revenue and Sales tables are the distinct of fields in the Table table? I'm recreating your scenario.

 

Thx,

BBF

Anonymous
Not applicable

@BeaBF In Scater chart, 
In values :- Customer
X-axis :-  Sales
Y-Axis:-  Revenue
Size:- Revenue

Legends:- Calculated_Column.

@Anonymous I't's working for me....

 

BeaBF_0-1720596334664.png

In the graph are you using only fields from the Table table, correct? 

 

BBF

Anonymous
Not applicable

Yeah.  but in slicer i'm using numeric parameter range.

@Anonymous to me it's still working with parameters... i need to see your file to understand the problem

 

@Anonymous I think this is the issue... can you shere the pbix?

 

BBF

Anonymous
Not applicable

@BeaBF  I didn't see any option to upload pbix fil here.

@Anonymous  you can upload the file in drive and then paste the link

Anonymous
Not applicable

@BeaBF Please find the belwo link

Fields we are using in scatter chart,

In values :- Customer
X-axis :-  Sales
Y-Axis:-  Revenue
Size:- Revenue

Legends:- Which are calculating the legends column.



Link:- File


Regards,
Prasad_78
Anonymous
Not applicable

@BeaBF Do you have any update.

@Anonymous Hi,

Sorry, my response must not have posted. I've tried countless times, but to dynamically change the legend, you must use a measure, which isn't accepted by the Scatter plot. Therefore, there is no solution.

As a workaround, you can use bookmarks to switch from one chart to another with different legends, but this won't fully achieve the desired functionality. I'm sorry for the bad news.

 

BBF

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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