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
Anonymous
Not applicable

How to concatenate two fields and apply a rating to them

I need to concatenate my month field with the year and let them in ascending order, Jan / 2008 fev2008 etc ....

 

I tried a simple concatenation and then apply the classification but did not work

 

Here is an example for clarity:

Untitled3.png

12 REPLIES 12
Greg_Deckler
Community Champion
Community Champion

I generally create a column like:

 

= FORMAT([Date],"yyyymm") 

And then use that as my Sort By column for the friendly display name column.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Sean @Greg_Deckler

I forgot to say that the fields are from different tables, the way to do it would be the same?

*should* 🙂 You would want to create your new "sort by" column in the same table as your date display field.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Anonymous You'll have to use the function RELATED(TableName[Column]) for one of them

 

 

Sean
Community Champion
Community Champion

@Anonymous if you are in Table 1 doing this

 

 = Table1[Column1]&" - "&RELATED(Table2[Column2])

 

Let me know if this works.

Anonymous
Not applicable

@Sean @Greg_Deckler

 

the following error is occurring:

 

"Unable to determine a single value for the 'Month' column in the 'dmegf_mes' table. This can happen when a measure formula refers to a column that contains many values, without specifying an aggregation such as min, max, count or sound for a unique result. "

 

my expression: = NewColumn dmegf_mes [Month] & "-" & RELATED (dmegf_ano [Year])

Sean
Community Champion
Community Champion

@Anonymous Hit Create New COLUMN - NOT Measure!

 

New Column.png

Anonymous
Not applicable

@Sean

that's what I'm doing, I'm going the option to create a new column and not measured

Sean
Community Champion
Community Champion

@Anonymous

 

NewColumn  =  dmegf_mes [Month] & "-" & RELATED (dmegf_ano [Year])

 

Anonymous
Not applicable

@Sean

 

the same error still occurs,

"Could not determine a single value for the 'month' column in the 'dmegf_mes' table. This can happen when a measurement formula refers to a column that contains many values, without specifying an aggregation such as min, max, count or sound for a unique result. "

Untitled4.png

 

Sean
Community Champion
Community Champion

@Anonymous show me what's in both columns - select each and show me whats in them (formula bar and data type)

 

the formula works - look

New Column2.png

Sean
Community Champion
Community Champion

@Anonymous

Create a New Column= TableName[Month]&" - "&TableName[Year]

 

this will give you => Month - Year

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.