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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.