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.
Hi there
I'm trying to group segments of days of customer late payments in a new column based on the number of delinquent days in different groups, 1-29 days late, 30-59 days late, etc.
I realize that DAX takes the first true condition when I use this IF ELSE formula since I'm only getting "1-29 days" for the entire column. I tried adding AND function to satisfy multiple conditions but I got an error "Token Else expected"
I'm fairly new to working with Power BI so apologies if there's a better approach I should be doing
Solved! Go to Solution.
Hi @Anonymous ,
I created some data:
Here are the steps you can follow:
1. Go to Power query and select add column – Custom column.
2. Enter the following information.
if [delinquent days] >=1 and [delinquent days]<=29
then "0-29 days"
else
if [delinquent days] >=30 and [delinquent days]<=59
then "30-59 days"
else
"GT 60"
3. Result:
If you need pbix, please click here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Anonymous ,
I created some data:
Here are the steps you can follow:
1. Go to Power query and select add column – Custom column.
2. Enter the following information.
if [delinquent days] >=1 and [delinquent days]<=29
then "0-29 days"
else
if [delinquent days] >=30 and [delinquent days]<=59
then "30-59 days"
else
"GT 60"
3. Result:
If you need pbix, please click here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
@Anonymous .
Try like
if [delinquent days] >=1 and [delinquent days] <= 29 then "0-29"
else [delinquent days] >=30 and [delinquent days] <= 59 then "30-59"
else "GT 60"
@amitchandak thanks for your reply
I'm getting this expected comma error. Am I missing anything there?
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 |
---|---|
104 | |
101 | |
79 | |
72 | |
64 |
User | Count |
---|---|
142 | |
108 | |
101 | |
81 | |
74 |