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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
NewbieJono
Post Partisan
Post Partisan

Mapping Table

Hello all, i have a mapping table to group different transactions. 

 

we have a scenareo where i would like to have a duplicate mapping file with different gorupings. so ending up with two different mapping files but with different groups

 

then i would like be able touse a filter in a report to swap back and fore between the two diffrent mapping tables.

 

hope this makes sense

 

Capture.PNG

1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

Hi @NewbieJono ,

Calculated columns are only calculated when you first define them and during a dataset refresh, it will not change by filters, it is a definite value, if you expect the value changes with filter, you can only use a measure.

 

In a measure, columns cannot be referenced directly, MAX function in a measure can return the current value in the same row of the column.

 

You can learn more about measures and calculated column in this article: calculated-measures-vs-calculated-columns

 

And according your provided,you could  test the below steps:

base table:

Table:

vluwangmsft_0-1650524318713.png

TableA:

vluwangmsft_1-1650524338697.png

TableB:

vluwangmsft_2-1650524353187.png

Relationship:

vluwangmsft_3-1650524370901.png

Step1, create slicer table,and keep the below relationship:

vluwangmsft_4-1650524417841.png

vluwangmsft_5-1650524427911.png

 

Step 2,create measure:

refer = IF(SELECTEDVALUE(Slicer[Type])="A",LOOKUPVALUE('Table A'[kind],'Table A'[Type],MAX('Table'[TYPE])),LOOKUPVALUE(TableB[Kind],TableB[Type],MAX('Table'[TYPE])))

 

then create visual:

vluwangmsft_6-1650524530478.pngvluwangmsft_7-1650524546170.png

If you need to map multiple columns, you need to create multiple conditional measures one by one.

 

 

 

 

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


Best Regards

Lucien

View solution in original post

3 REPLIES 3
v-luwang-msft
Community Support
Community Support

Hi @NewbieJono ,

Calculated columns are only calculated when you first define them and during a dataset refresh, it will not change by filters, it is a definite value, if you expect the value changes with filter, you can only use a measure.

 

In a measure, columns cannot be referenced directly, MAX function in a measure can return the current value in the same row of the column.

 

You can learn more about measures and calculated column in this article: calculated-measures-vs-calculated-columns

 

And according your provided,you could  test the below steps:

base table:

Table:

vluwangmsft_0-1650524318713.png

TableA:

vluwangmsft_1-1650524338697.png

TableB:

vluwangmsft_2-1650524353187.png

Relationship:

vluwangmsft_3-1650524370901.png

Step1, create slicer table,and keep the below relationship:

vluwangmsft_4-1650524417841.png

vluwangmsft_5-1650524427911.png

 

Step 2,create measure:

refer = IF(SELECTEDVALUE(Slicer[Type])="A",LOOKUPVALUE('Table A'[kind],'Table A'[Type],MAX('Table'[TYPE])),LOOKUPVALUE(TableB[Kind],TableB[Type],MAX('Table'[TYPE])))

 

then create visual:

vluwangmsft_6-1650524530478.pngvluwangmsft_7-1650524546170.png

If you need to map multiple columns, you need to create multiple conditional measures one by one.

 

 

 

 

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


Best Regards

Lucien

amitchandak
Super User
Super User

@NewbieJono ,The information you have provided is not making the problem clear to me. Can you please explain with an example.

Appreciate your Kudos.

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

i have a list of trasactions which are grouped using the maping table.

e.g Trasaction 1-4 are group as group A in th mapping table.

 

however i would like another mapping table that groups things differently (as a test for the bsuinsess)

e.g Trasaction 1-4 are group as group B in the mapping table.

 

i am ok creating these two mapping tables, but is there a method to switch betweeen these two tables using filters. E,g i wish to by default show the data arranged using the firs mapping table. but i would like to switch to the second if to see how things change with the different mappings.

 

basically, i will have two mapping tables and need to switch the relationsips between both from a filter on a page

 

Capture.PNG

 

 

 

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.