Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

How to show a custom data when there aren't datas

Received Response
71
Views
19
Comments
Barticchia
Barticchia Rank 4 - Community Specialist

Hi to everyone

i got a problem with an analysis.

I'm going to make an example as easy as possibile:

i have 3 fields; the first one is prompted.

Normaly, when there aren't datas for field prompted, a message appear like:

No Results.

The specified criteria didn't result in any data...  something like that.

Question is: Is it possible in that case showing all 3 fields with 1 1 1?

field 1     field 2     field 3

   1             1             1

Source where i get datas is a view.

Any idea?

Many thanks

SB

«1

Answers

  • ArijitC
    ArijitC Rank 6 - Analytics Lead

    You can use custom mesg for no data...

    pastedImage_1.png

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner

    Hi Barticchia,

    Having fun late at night? So if your query actually does not retrieve anything at all from the data source it's hard to "fake" a row because the data set coming back is - well - empty.

    What's the use case and hwo does it help you to to have a fake row of 1s?

  • Barticchia
    Barticchia Rank 4 - Community Specialist

    You right Christian! this is the best moment to work without noise around me (my wife )

    Anyway...

    This issue because all project is using web services request and they use XML query.

    Results looks like

    <Row>

            <Column0>0185319802</Column0>

            <Column1>2</Column1>

            <Column2>INFOSTRADA</Column2>

            <Column3>20020509005603809</Column3>

            <Column4>20020509005603809</Column4>

            <Column5>20160627203813000</Column5>

        </Row>

    when no recors result, MUST be like

    <Row>

            <Column0>0</Column0>

            <Column1>-1</Column1>

            <Column2> </Column2>

            <Column3></Column3>

            <Column4></Column4>

            <Column5></Column5>

        </Row>

    It means that i have to custom result with some kind of dummy record.

    let's leave aside webservices for the moment. If i can solve it here in analysis, will be solved even with WS.

    Any idea Chris?

  • Barticchia
    Barticchia Rank 4 - Community Specialist

    thanks for your answer, but this will not suit to the request.

  • Sherry George
    Sherry George Rank 7 - Analytics Coach

    Have not tested this idea, may be create a union report ?

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner

    Sherry beat me to it. A UNION would be a way to force this.

    Then again you said the data source itself is a view so maybe the code in the source could already deliver you that default row. This way your front-end can be built without having to handle that exception case.

    Edit: pray that your wife never reads OTN or you're dead

  • Barticchia
    Barticchia Rank 4 - Community Specialist

    First of all thanks to all of you for your answers ...

    What about filter? Actually view is empty and tomorrow procedure will fill it so i can't test it as i would.

    In both queries should i use same prompt?

         pippo     pluto     paperino

    union

         '0'              -1          null

    first query has pippo = '12345'

    do i leave second query without filter?

    if yes, what will appear if the first one has data filtered? maybe 2 rows?

    scenario result with union:

    12345     integer     string

        0            -1           null

  • Sherry George
    Sherry George Rank 7 - Analytics Coach

    Sorry I cannot try it out right now, but probably this involves a couple of set operations (MINUS, UNION) with 3 or 4 reports.

  • Barticchia
    Barticchia Rank 4 - Community Specialist

    Just to be sure...

    when you talk about 3 or 4 reports, you mean in the same analysis right?

    is it possible to take another analysis if the first one is without datas?

    would be grea!

  • Sherry George
    Sherry George Rank 7 - Analytics Coach

    Yes I'm talking about 3 or 4 criteria in the union (same analysis).