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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
afrutos
Resolver I
Resolver I

Conditional column

afrutos_0-1637242609591.png

Hi everyone, 
I have these two columns, one for Season and the other one for Chapter.
And I would like to create a Column that in case the season is not null/blank, then appear, S1, if not, continue in blank.
But I can manage to do that.

Thank you everyone

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @afrutos ,

 

You may use & to replace the "+" :

=if [NroTemporada]<> null then "T. " &Number.ToText(  [NroTemporada]) else [NroTemporada]

Eyelyn9_0-1637651624195.png

 

If you want to use DAX, please try:

Column = 
VAR _STR=CONVERT([NroTemporada],STRING)
RETURN IF( _STR<>"", "T. " &_STR, _STR)

Eyelyn9_1-1637651899075.png

 

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @afrutos ,

 

You may use & to replace the "+" :

=if [NroTemporada]<> null then "T. " &Number.ToText(  [NroTemporada]) else [NroTemporada]

Eyelyn9_0-1637651624195.png

 

If you want to use DAX, please try:

Column = 
VAR _STR=CONVERT([NroTemporada],STRING)
RETURN IF( _STR<>"", "T. " &_STR, _STR)

Eyelyn9_1-1637651899075.png

 

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

afrutos
Resolver I
Resolver I

afrutos_0-1637246236450.png

Hi, @BA_Pete 
It works for the ones that have NroTemporada not null. But Ithought I could just not shown the null ones, as in the example for not to have it duplicated. 

BA_Pete
Super User
Super User

Hi @afrutos ,

 

Try this in a new custom column:

if [NroTemporada] <> null then "S1" else [NroTemporada]

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




I would need something like this

afrutos_0-1637247469056.png

"T. " + [NroTemporada]
So that I could have T. 1, T. 2.....

I see.

 

Try this instead then:

if [NroTemporada] <> null
then Text.Combine({"T. ", Text.From([NroTemporada])}, "")
else [NroTemporada]

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.