Forum Discussion

Freddus's avatar
Freddus
Regular Visitor
9 years ago
Solved

Need help presenting a comparable Line graph with 4 different lines

Hi, 

 

I need help to create a Line Graph with four different report (4 sheets). I have done a appended query so the 4 sheets are combined. However, each report have different date periods so the line graph will be inconsistent. How can I form the data so that the X-axis show only last 30 values or similar in order to make a comparable graph. 

 

Please let me know if you need furhter information. Help very much appreciated. 

 

Rgrds, Fred

  • there is multiples solutions 

    you could combine the 4 tables by this:

     

    Modeling - New Table

     

    Merged4Books = UNION
    (
    TOPN(30;Table1;Table1[Date];DESC);

    TOPN(30;Table2;Table2[Date];DESC);

    TOPN(30;Table3;Table3[Date];DESC);

    TOPN(30;Table4;Table4[Date];DESC);

    )

     

    or alternatively you can add sorted index by date to the source and then join on that so the most current date is 1 the day before 2 and so on

    theres other possibibilities but for that I would need to see the data

7 Replies

  • there is multiples solutions 

    you could combine the 4 tables by this:

     

    Modeling - New Table

     

    Merged4Books = UNION
    (
    TOPN(30;Table1;Table1[Date];DESC);

    TOPN(30;Table2;Table2[Date];DESC);

    TOPN(30;Table3;Table3[Date];DESC);

    TOPN(30;Table4;Table4[Date];DESC);

    )

     

    or alternatively you can add sorted index by date to the source and then join on that so the most current date is 1 the day before 2 and so on

    theres other possibibilities but for that I would need to see the data

    • Freddus's avatar
      Freddus
      Regular Visitor

      Thank you. Brilliant, I appreciate it. 

       

      I used the first alternative. 

       

      So the next crux. I don't want it to ignore null values. What can I do about that? 

       

      Thanks, 

      Fred

      • cs_skit's avatar
        cs_skit
        Icon for Resolver IV rankResolver IV

        Null values of what? Is date Null???

         

        The merge should give you 30 rows per table does not matter if some field in rows is blank.

        What is the problem? maybe give some screenshot of the Chart or Data???