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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
gmichalec
Frequent Visitor

Returning a static column value based on another column

New PowerBi user here. I have a dynamic table with data like this:

 

CategoryGross MarginGross Margin per unitTarget per unit
A3000$3.25?
B200$5?
C500$7.20?
D100$15?

 

In the 4th column I would like to return a static Target Per Unit value depending on the category. Aside from the exception described below, this value would not be affected by slicers; it is set during the annual budgeting process. 

 

One wrinkle is that the data is referencing two consolidated companies, and that choosing one company over another in that particular slicer would need to change the Target per unit, as the Target is different per company for each category.

 

Thanks in advance for your time and help in this. 

3 REPLIES 3
Anonymous
Not applicable

Hi @gmichalec ,

 

Any updates?

 

Best Regards,
Eyelyn Qin

Anonymous
Not applicable

Hi @gmichalec ,

 

Sorry for that the information you have provided is not making the problem clear to me. Can you please share more details to help us clarify your scenario?

Like what's the calculated logic of Target per unit? What do you mean it will not be affected by a slicer? The calculated column is indeed static, it will not be changed by selection in slicer. And please show us your expected outputs...

 

Please kindly refer to the blogs to know

How to Get Your Question Answered Quickly - Microsoft Power BI Community

How to provide sample data in the Power BI Forum - Microsoft Power BI Community

 

 

Best Regards,
Eyelyn Qin

amitchandak
Super User
Super User

@gmichalec , Not very clear,

 

You can create a new column like

 

Switch( [Category],

"A", 50,

"B", 20,

"C", 30,

"C", 40 )

 

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

Helpful resources

Announcements
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.

Top Kudoed Authors