Forum Stats

  • 3,827,529 Users
  • 2,260,790 Discussions
  • 7,897,291 Comments

Discussions

Changing data format for varchar datatype

One way to change data format to a column with varchar as datatype is to use String functions in a measure in obiee Admin tool and then use it in report.

But I need to change data format directly in report. How can I do it in obiee 11g in 'Column Properties' -> 'Data Format'? or is there any other way to do it in report?

Tagged:

Answers

  • Christian Berg-0racle
    Christian Berg-0racle Everything Analytics And Data Member Posts: 9,639 Gold Crown

    Do you mean treating an column as a measure instead of as an attribute?

    In that case the "simple" change in the front-end would be to add an aggregation rule to the column. Like

    SUM("MyTable"."MyColumn")

    HOWEVER - be aware that you're basically violating the logic of the model when doing this. First of all you should not have any attributes residing in a fact table unless you use it to do derived calculations or so. But even then it only should be part of the logical fact table in the RPD Business Model Layer. NOT exposed as a presentation column!

    Second: While you can make a dimension attribute a measure by saying SUM(me that column please) the will not magically make it work with all capabilities of the tool or other dimensions.

    tl;dr - it's doable but it's neither the proper not correct way :)

  • Christian Berg-0racle
    Christian Berg-0racle Everything Analytics And Data Member Posts: 9,639 Gold Crown

    Did you double-post your question slightly changed to StackOverflow? https://stackoverflow.com/questions/72227711/obiee-custom-format-changing-a-column-data-format-with-varchar-datatype

    If so, then the SO question is less ambiguous than the one here and the answer is CAST.