The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Dear All,
i have two tables:
1) Table1
Code | Recl_Code_A | Recl_Code_B |
0100 | AAA | |
0150 | BBB | |
0200 | AAA | BBB |
2) Table2
Code | Value | Date |
0100 | 300 | 01/01/2024 |
0100 | 100 | 16/01/2024 |
0150 | -600 | 28/02/2024 |
0200 | 500 | 01/03/2024 |
0200 | 400 | 02/03/2024 |
0200 | -1.000 | 01/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:
Code | Recl_Code_A | Recl_Code_B |
0100 | 400 | |
0150 | -600 | |
0200 | 900 |
If I filter the following table visual for dates 01/04/2024-30/04/2024, then:
Code | Recl_Code_A | Recl_Code_B |
0200 | -1.000 |
Any idea?
Thank you a lot
Solved! Go to Solution.
Hi,
PBI file attached.
Hope this helps.
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
Thanks!