Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello,
I keep getting this error - I am truing to sort customer lifespan by days active - however it keeps coming up with this error above.
Can anyone help me with this issue?
The calculated column is in dax -->
years_months_days_active =
VAR days = dim_account[Query1.days_active]
VAR years = ROUNDDOWN(days / 365, 0)
VAR days_remainder_year = MOD(days, 365)
VAR months = ROUNDDOWN(days_remainder_year / 30, 0)
VAR days_remainder_months = MOD(days_remainder_year, 30)
RETURN
SWITCH(
TRUE(),
days = BLANK() || days_remainder_months = 0, BLANK(),
years = 0 && months = 0, days_remainder_months & "d",
years = 0, months & "m " & days_remainder_months & "d",
years & "y " & months & "m " & days_remainder_months & "d"
)
Hi @gussie ,
I used your calculated column and created the following data:
1. Click [customer lifespan], select Column tools – Sort by column – [Query1.days_active]
2. Result:
My data will be sorted correctly
Is your Power bi Desktop version the latest version, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
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.
@gussie , this means you have one value for which you have more than one sort index.
Refer my video where I discussed these issues: https://www.youtube.com/watch?v=KK1zu4MBb-c
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
117 | |
84 | |
49 | |
38 | |
28 |
User | Count |
---|---|
187 | |
76 | |
73 | |
50 | |
42 |