Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Can anyone please help me with 2 measures or calculated columns to make adjustments on INVOICE PAYMENT and PENDING columns. ADJUSTED INVOICE PAYMENT column will only calculate the rows with negative amounts on the PENDING column by adding INVOICE PAYMENT column and PENDING column while those with non-negative amount will reain as it is.
Below is the the data table and the expected output for the 2 measures.
DATA TABLE | |||
INVOICE NO | INVOICE AMT | INVOICE PAYMENT | PENDING |
1 | 35.07 | 36 | -0.93 |
2 | 450.8 | 445.93 | 4.87 |
3 | 576 | 576.88 | -0.88 |
Expected output :
MEASURE 1 | MEASURE 2 |
ADJUSTED INVOICE PAYMENT | ADJUSTED PENDING |
35.07 | 0 |
445.93 | 4.87 |
576 | 0 |
Thanks!!!
Solved! Go to Solution.
Not an amazingly elegant solution, but this should work:
Add two calculated columns as below -
Adjusted Invoice Payment = IF ( Pending < 0 , InvoicePayment - Pending, InvoicePayment )
Adjusted Pending = IF ( Pending < 0, 0, Pending )
Hope this helps!
Not an amazingly elegant solution, but this should work:
Add two calculated columns as below -
Adjusted Invoice Payment = IF ( Pending < 0 , InvoicePayment - Pending, InvoicePayment )
Adjusted Pending = IF ( Pending < 0, 0, Pending )
Hope this helps!
Thanks a lot!!! You just cured my weeklong headache
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
98 | |
78 | |
66 | |
53 |
User | Count |
---|---|
139 | |
100 | |
95 | |
85 | |
63 |