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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.