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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
kk_shp_user
Helper I
Helper I

Measure based on a column B value which is equal to Column A Slicer Value

I have two tables as shown below with a relationship on id column.

 

In Table_1, each id might have the same internal and external title (or)  a different internal title to that of the extrernal title.

Lets assume A,B,C,D,E as the titles; So, an id 010 might have an internal title = 'A' and external title = 'E'

 

kk_shp_user_0-1713959105569.png

 

I am trying to get a measure that will give the SUM(sales) from Table_2 for ids based on external title while I have a slicer with internal title.

 

Example, I have a slicer for internal title. When I choose the internal title 'A', I want the measure to display the SUM(sales) for ids that have an external title 'A'.

 

I tried the below measure but it does not seem to work,

 

 CALCULATE(SUM('Table_2'[sales]), TREATAS(VALUES('Table_1'[internal title]), 'Table_1'[external title]))
1 ACCEPTED SOLUTION
Martin_D
Super User
Super User

Hi @kk_shp_user ,

 

You need to also remove the filter from the internal title column, otherwise this still applies and your result includes only ids with internal title = A and external title = A.

 CALCULATE(SUM('Table_2'[sales]), TREATAS(VALUES('Table_1'[internal title]), 'Table_1'[external title]),REMOVEFILTERS('Table_1'[internal title])))

 

Kind regards,

Martin

View solution in original post

4 REPLIES 4
Martin_D
Super User
Super User

Hi @kk_shp_user ,

 

You need to also remove the filter from the internal title column, otherwise this still applies and your result includes only ids with internal title = A and external title = A.

 CALCULATE(SUM('Table_2'[sales]), TREATAS(VALUES('Table_1'[internal title]), 'Table_1'[external title]),REMOVEFILTERS('Table_1'[internal title])))

 

Kind regards,

Martin

Thanks I'll try this and report back.

 

Another query - if I use this measure inside another measure, will it still work?

Hi @kk_shp_user ,

Yes inside of another measure it will still work, e.g., like this:

 

Some other measure = [Above measure] + [addition measure]

 

Kind regards,

Martin

Anonymous
Not applicable

@Martin_D  Thanks for your contribution on this thread.

Hi @kk_shp_user ,

What's your final expected result? Could you please provide some sample data (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following link to share the required info:

How to provide sample data in the Power BI Forum


Another query - if I use this measure inside another measure, will it still work?


Best Regards

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.