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
I have a calculated column in my table that works out number of Days to Expiry, and I then need another calculated column to allocate descriptors based on that number to give me 'Expiry Status'. I am trying the following:
Solved! Go to Solution.
Thanks everyone for trying to help. I have just got it to work using the following:
Thanks everyone for trying to help. I have just got it to work using the following:
@philippa_f
Hi,
Try following code.
Thanks
Hi AUDISU
Thanks. I tried this, but it gives a result of 'Expired' for every line of data, although there are definitely some that should be in each category. Any idea what I am doing wrong? Data type is text, if I change it to numbers I just get an error for everything, with a message saying Cannot convert value 'Expired' of type Text to type Integer.
I really appreciate you taking the time to help with this.
Philippa
Hi,
Share the link from where i can download your PBI file.
Sorry! I can't do this as it's private organisational stuff 😞
I will try to create a dummy anonymised version though.
Hi Philippa,
Can I see your DAX formula?
Thanks
Hi Philippa,
Please check data type of 'MyTable'[DaystoExpiry] column.
If it is not in number format change it to number.
Thanks
Kindly check the datatype of "'MyTable'[DaystoExpiry]"
When you are calculating null/blank values for MyTable'[DaystoExpiry] it is better to return BLANK not "" which causes to enforce column to Text datatype.
Proud to be a Super User!
Hi FarhanAhmed
Thanks so much for getting back to me. I did substitute BLANK in the code above instead of "" - was this what you meant?
Like this:
But it is still not working, giving me an incorrect syntax error. Can you spot what I have done wrong? Many thanks in advance!
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 |
---|---|
114 | |
100 | |
75 | |
73 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |