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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
alecev
Frequent Visitor

Another IF with SELECTVALUE not working

Hi,

I'm facing a problem since days that i cannot solve.

I found some similar help messages in this forum with "IF with SELECTVALUE" in the object, but no one helped me to solve mine.

My problem is that I have a list of suppliers with Names, IDs and a Score:

IDNameScore
3498751   Supplier Name 1    2,17
3952340Supplier Name 24,16
7092052Supplier Name 34,33
9700018Supplier Name 44,32
7511869Supplier Name 55,87
577385Supplier Name 66,14
7282137Supplier Name 74,33
6997920Supplier Name 85,03
472806Supplier Name 94,16

I can show an histogram with names (on X) and scores (on Y) or IDs (on X) and scores (on Y).

But I need a different view: I need to show all scores in y-axis, and all IDs in the x-axis, except that one that i want to show with its Name, example:

alecev_0-1746011612513.png

 

I need this view when I have to show to "Supplier Name X", its score compared to other suppliers, without let him know who are other suppliers.

So I created a second table with only Supplier Names, using it to select in the slider.
Then I created a new x-axis column in the following way: 
IF('Supplier Table'[Names] = SELECTEDVALUE('Supplier Names'[Names],""), 'Supplier Table'[Names], 'Supplier Table'[IDs])
but it does not work.
Any ideas how to solve?
 
3 REPLIES 3
bhanu_gautam
Super User
Super User

@alecev Create a new calculated column in your 'Supplier Table' to determine whether to show the Name or the ID based on the selected supplier.

DAX
NewXAxis =
IF(
'Supplier Table'[Names] = SELECTEDVALUE('Supplier Names'[Names], ""),
'Supplier Table'[Names],
'Supplier Table'[IDs]
)

Use this new column as the x-axis in your visualization.

 




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Updated post with link to pbix

sorry but it is exactly what I tried and did not work.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors