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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
monikapowerbi12
New Member

We cannot convert the value to type Text

Hi!

I have duplicated values and I wanted to derive maximum FixVersionsID value per Jira key.

I came up with this code and I know it shows correct values underneath I constantly have "We cannot convert the value to type Text" error. 
FixVersionsID is a number, Jira key is the number. I don't know what else to do. 

Kindly advice

= Table.TransformColumnTypes(
Table.AddColumn(
#"Added Custom",
"MaxXPerY",
each Table.Max(
Table.Group(
#"Added Custom",
{[FixVersionsID]},
{{"MaxXPerY", each List.Max(([Jira key])), type number}}
)
)
),
{{"MaxXPerY", type number}}
)

 

1 REPLY 1
BA_Pete
Super User
Super User

Hi @monikapowerbi12 ,

 

Ok, you've got a few things going on here:

 

-1- This should be a text reference, {"FixVersionsID"}, not a field reference:

BA_Pete_0-1697522209436.png

 

-2- You have a double set of brackets here that should be a single set:

BA_Pete_1-1697522264959.png

 

-3- You're missing the second argument in Table.Max to tell PQ which column you want to identify the max of:

BA_Pete_2-1697522419408.png

 

I would recommend starting this again but doing each step separately, one by one, until you get the result you want.

If at that point you want to bundle all the steps into a single one, then at least you will have syntactically correct steps to combine.

 

Pete



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

Proud to be a Datanaut!




Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors