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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Heymm
Regular Visitor

Dynamic report and dynamic column based on a Slicer

I built a Power BI report where the main logic depends on a Conditional Column called “Category,” defined as:

- If Company Type equals A, then A, else Others.

All chart legends and filters are based on this Category column.

 

However, I also have Company B, C, D, up to L. To switch the focus to a different Company Type, I currently need to manually edit the Conditional Column in Power Query. Because the Category column always displays one specific category and “Others.” I also would like to display both the selected category and “Others” in the charts dynamically.

 

Is there a way to achieve this using a slicer instead of modifying the Conditional Column each time? If so, how?

3 REPLIES 3
Anonymous
Not applicable

Hi @Heymm ,

 

Thanks lbendlin  for the quick reply. I have some other thoughts to add:

(1) This is my test data.

vtangjiemsft_0-1735524144617.png

(2) We can create a slicer table and a Category measure. Note that there is no model relationship between the slicer table and the original table.

 

Slicer Table = VALUES('Table'[Company Type])
Category = IF(SELECTEDVALUE('Slicer Table'[Company Type])=MAX('Table'[Company Type]),MAX('Table'[Company Type]),"Others")

 

 

vtangjiemsft_1-1735527166197.png

Since Category is a measure, it cannot be placed on a slicer visual object, but you can place the measure on a visual object filter.

vtangjiemsft_2-1735527348504.png

(3) Calculated columns can't dynamically get the value selected by the slicer, so we need to create three columns.

 

A = IF([Company Type]="A","A","Others")
B = IF([Company Type]="B","B","Others")
C = IF([Company Type]="C","C","Others")

 

Create field parameters.

vtangjiemsft_0-1735527658554.png

vtangjiemsft_1-1735527751370.png

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Heymm
Regular Visitor

It is not really sensitive, just one company compare with the rest company? I have few company need this report. Each time the report only can show one company vs rest company. 

lbendlin
Super User
Super User

Is the result sensitive, ie should the report users not be able to identify which companies are in the "Other"  bucket?

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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