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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
michael_knight
Post Prodigy
Post Prodigy

Total value of Switch(True() measure in Table Visual

Hi,

 

I created a Switch(True() measure and then used it within a table but it's not displaying the correct values in the total column

 

I believe it may be using the context of the Switch(True() measure within the Total column. 

 

Switch = SWITCH(TRUE(),
[Margin Measure] >= 100, 1000,
[Margin Measure] >= 80, 500) 

 

switch.PNG

In the example above, I want the Switch columns total to be 5,000 rather than 1000

 

https://www.dropbox.com/s/yl5ypb8tz8asim7/help%20-%20Copy.pbix?dl=0

 

Thanks,

Mike

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @michael_knight ,

 

In your sample data you could use ISINSCOPE() function to create a new measure as below.

Measure = IF(ISINSCOPE(Sheet1[Agent]),[Total],SUMX('Date',[Total]))

8.PNG

 

Best Regards,

Jay

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @michael_knight ,

 

In your sample data you could use ISINSCOPE() function to create a new measure as below.

Measure = IF(ISINSCOPE(Sheet1[Agent]),[Total],SUMX('Date',[Total]))

8.PNG

 

Best Regards,

Jay

ryan_mayu
Super User
Super User

@michael_knight 

here is a workaround for you





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thanks, won't be able to apply that to my main dataset. Do you have any alternatives?

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.