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
powerbricco
Advocate I
Advocate I

measure which change column reference

Dear All,

i have two tables:

1) Table1

CodeRecl_Code_ARecl_Code_B

0100

AAA 

0150

 BBB

0200

AAABBB

 

2) Table2

 

CodeValueDate
010030001/01/2024
010010016/01/2024
0150-60028/02/2024
020050001/03/2024
020040002/03/2024
0200-1.00001/04/2024

 

 

Tables are in a one-to-many relationship with code as the key.

 

What I need to achieve is a measure where:

if sumx(value) is a positive value, then assign it to Recl_Code_A, else Recl_Code_B.

 

If I filter the following table visual for dates 01/01/2024-31/03/2024, then:

CodeRecl_Code_ARecl_Code_B
0100400 
0150 -600
0200900 

 

If I filter the following table visual for dates 01/04/2024-30/04/2024, then:

CodeRecl_Code_ARecl_Code_B
0200 -1.000

 

Any idea?

Thank you a lot

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1734480980624.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1734480980624.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Deelip
Resolver I
Resolver I

Hi @powerbricco 

You can acheive this by creating two measures and drag those measures onto the table visual. 

 

Pbix file is this in link: https://drive.google.com/file/d/1_rBU18H9QHdvogGoqWbHcNTC3sIWdVLG/view?usp=drive_link

 

this will be your expected output if you create two measures 

 

Deelip_0-1734467527189.png

Thanks!

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.