Latest Enterprise DNA Initiatives

LOB Type in group by Clause - SAP HANA - Custom Column Error


I have datasource as SAP HANA. The odbc and connection everything works fine.

But I am getting this weird issue when I am creating a custom column. Moreover, if I remove [CUST_NAME] from the formula then it works fine. But I do need CUST_NAME in the formula. Not able to narrow it down. TIA.

This is the step where I get error:


Hi @rit372002,
Thank you very much for posting your query in the forum.
I have been looking for information on how to use LOB fields in a group by clause and it indicates that a conversion to an nvarchar data type must be done.

To get the data from SQL Server and convert the VARBINARY(MAX) data type to varchar I use the CAST function:

SELECT ID, NAME, STUDENTS, START_DATE, CAST( Testblob as varchar) AS VarbinarytoText FROM;

Let’s see if it can help you for the SAP HANA case.


@jafernandezpuga Thanks for replying to my post.

I did in fact converted the custom column and all the underlying parts of custom column to TEXT datatype in Power BI. But there was still a problem. Right now, I changed the formula from:

Old Formula  = 
if [Group v Sold to] = "G" then [GROUP_NAME] else [#"Sold-to party"]&" - "&[CUST_NAME]

New Formula =  
if [Group v Sold to] = "G" then [GROUP_NAME] else if [Group v Sold to] <> "G" then [#"Sold-to party"] &" - "&[CUST_NAME] else 1

And that resolved the issue. I am still not sure how it got resolved though. Thoughts?