Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Nelleke-NL
Helper II
Helper II

How to make text category in custom column

Sorry for language, my Dutch is better....

 

I have now 

 

NellekeNL_0-1701093345261.png

But it changed in : 

 

= Table.AddColumn(#"Type gewijzigd", "Groep",

each if [duur dossierbehandeling] <= 3 then "0-3" else if [duur dossierbehandeling] <= 6 then #date(2023, 6, 4) else

if [duur dossierbehandeling] <= 9 then #date(2023, 9, 7) else

if [duur dossierbehandeling] <= 12 then #date(2023, 12, 10) else

"zoek")

 

What is the wright formule for getting  #date(2023, 6, 4)   ==> 4-6  as text so not a date

 

Who want to help me

1 ACCEPTED SOLUTION
tackytechtom
Super User
Super User

Hi @Nelleke-NL ,

 

How about this?

tackytechtom_0-1701094269760.png

 

= Table.AddColumn(#"Type gewijzigd", "Groep", each 
if [duur dossierbehandeling] <= 3  then "0-3" else 
if [duur dossierbehandeling] <= 6  then "4-6" else
if [duur dossierbehandeling] <= 9  then "7-9" else
if [duur dossierbehandeling] <= 12 then "10-12" else "zoek")

 

Let me know if this helps 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

View solution in original post

2 REPLIES 2
tackytechtom
Super User
Super User

Hi @Nelleke-NL ,

 

How about this?

tackytechtom_0-1701094269760.png

 

= Table.AddColumn(#"Type gewijzigd", "Groep", each 
if [duur dossierbehandeling] <= 3  then "0-3" else 
if [duur dossierbehandeling] <= 6  then "4-6" else
if [duur dossierbehandeling] <= 9  then "7-9" else
if [duur dossierbehandeling] <= 12 then "10-12" else "zoek")

 

Let me know if this helps 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

I did that 

= Table.AddColumn(#"Type gewijzigd", "Groep", each if [duur dossierbehandeling] <= 3 then "0-3" else if [duur dossierbehandeling] <= 6 then "4-6" else if [duur dossierbehandeling] <= 9 then "7-9" else if [duur dossierbehandeling] <= 12 then "10-12" else "zoek")

 

and then after <enter> date are coming.... Know I have several time changed the text "7-9" etc and now it is working complete! I think somewhere in "" or "" is a differentcy. 

 

Still learning and thanka a lot for help and understanding.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.