Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello World,
I have this new column Days past dues (Days Past Dues = DATEDIFF(Sheet1[TransactionDate ],Sheet1[PaymentDate ],DAY). Days past dues gives me the days differences between transaction date and payment date.
I have lots of negative days past dues which means the payment was done before the transaction date.
Now,
I want to create a column using some logical functions where the negative days (which means payment made earlier than the transaction date) means "Early Payment". And the one with postive days means "Late Payment". And the past due days which is 0 means"At time Payment".
Solved! Go to Solution.
Hi @Anonymous
Please try
Payment Condition =
SWITCH (
TRUE (),
Sheet1[Days Past Dues] < 0, "Early Payment",
Sheet1[Days Past Dues] > 0, "Late Payment",
"At time Payment"
)
Hi @Anonymous
Please try
Payment Condition =
SWITCH (
TRUE (),
Sheet1[Days Past Dues] < 0, "Early Payment",
Sheet1[Days Past Dues] > 0, "Late Payment",
"At time Payment"
)
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 21 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 35 | |
| 31 | |
| 20 | |
| 13 | |
| 10 |