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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
PBIfanatic
Helper V
Helper V

Selected Value issue

Hi,

 

I am trying to represent the below data

 

CategoryProductSales
Cat1Prod1100
Cat1Prod2200
Cat2Prod3 
Cat2Prod4 

 

as this, with a conditional format based on the Sales Value. 

Product
Prod1
Prod2
Prod3
Prod4

 

The challenge I have is I need to show all the products irrespective of whether it is from Cat1 or 2. Category is the slicer. So I have used edit interactions to ignore the selection of the slicer. 

But the Sales is a measure derived from few other measures and the selection of the category. 

As I am ignoring the selection for the table I am displaying, it ignores the measure calculation which used SelectedValue. 

 

How do I get all the Products and use SelectedValue in the scenario I mentioned. 

Thanks in advance.

 

 

 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@PBIfanatic , I think you need an independent category table and use it as per need

 

refer if needed

Need of an Independent Table in Power BI: https://youtu.be/lOEW-YUrAbE

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

v-yalanwu-msft
Community Support
Community Support

Hi, @PBIfanatic ;

You could create a table as a slicer by cate column,then modify the measure as follow:

1.create a table as slicer.

slicer = VALUES('Table'[Category])

2.then modify measure.

Measure = IF(ISFILTERED(slicer[Category]), CALCULATE(SUM([Sales]),FILTER(ALL('Table'),[Category]=SELECTEDVALUE('slicer'[Category]))),SUM([Sales]))

The final output is shown below:

vyalanwumsft_0-1640656656779.pngvyalanwumsft_1-1640656678110.png

 

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yalanwu-msft
Community Support
Community Support

Hi, @PBIfanatic ;

You could create a table as a slicer by cate column,then modify the measure as follow:

1.create a table as slicer.

slicer = VALUES('Table'[Category])

2.then modify measure.

Measure = IF(ISFILTERED(slicer[Category]), CALCULATE(SUM([Sales]),FILTER(ALL('Table'),[Category]=SELECTEDVALUE('slicer'[Category]))),SUM([Sales]))

The final output is shown below:

vyalanwumsft_0-1640656656779.pngvyalanwumsft_1-1640656678110.png

 

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

AlexisOlson
Super User
Super User

@PBIfanatic As @amitchandak points out, this isn't possible without a separate dimension table. Ideally, you'd have a dimension table for Category and another for Product.

 

I recommend this article for more detail on why star schemas with proper dimension tables are important:
https://www.sqlbi.com/articles/the-importance-of-star-schemas-in-power-bi/

amitchandak
Super User
Super User

@PBIfanatic , I think you need an independent category table and use it as per need

 

refer if needed

Need of an Independent Table in Power BI: https://youtu.be/lOEW-YUrAbE

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks @amitchandak  this worked.

 

Thanks @v-yalanwu-msft ; @AlexisOlson for your replies

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors