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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.