Forum Discussion

Tigex's avatar
Tigex
Regular Visitor
9 years ago
Solved

Single Yearly File and Months Comparison Chart

Hi everybody, I have an excel file made of X rows and 2 columns.

The rows are the dates (more or less all the days in a year) and the columns are the $ income and notes.

Is there a way to have a single Line Chart showing the comparison between each day in 2 specific months ? (daily value of two different months)

Thank you

 

  • Hi Tigex,

     

    I attached the file here: https://1drv.ms/u/s!ArTqPk2pu-BkgQzkLSKO_LWuXijo, which would be a clear explanation. 

    1. One date table (Calendar) and your data table (table1);

    2. 12 measures. (copy and paste, then change 1 to 2 - 12).

    January =
    CALCULATE (
        SUM ( Table1[Value] ),
        FILTER ( 'Calendar', MONTH ( 'Calendar'[Date] ) = 1 )
    )

    3. Create a visual.

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Best Regards!

    Dale

6 Replies

  • vanessafvg's avatar
    vanessafvg
    Community Champion

    Tigex

     

    previous month = calculate(sum(measure), previousmonth(calendartable[date])

     

    best practise to add a date table to your model and then create relationship between you table and the date, it might be fine without it but its not recommended

     

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Microsoft Employee

    Hi Tigex,

     

    Do you mean comparing values day by day? Do you want to choose the specific month? Could you please post a sample in text mode if needed?

    Date                   CurrentValue  ValueOfSpcificMonth

    2017-07-01         100                  120    (2017-04-01)

    2017-07-02         100                  110    (2017-04-02) 

    ... ...

    2017-07-30         100                  120   (2017-04-30)

    2017-07-31         100                  150   (2017-04-??)   

     

    Best Regards!

    Dale

    • Tigex's avatar
      Tigex
      Regular Visitor

      Ok, i will try to be more specific.

       

      The excel looks like this:

       

      2017-01-01 | 100$ | note1

      2017-01-02 | 950$ | note2

      ..

      ..

      2017-08-01 | 140$ | notex

      2017-08-02 | 800$ | notey

      ..

       

      I would like to have a dashboard where i can choose 1 or more months and than show a line chart comparing the values (day-by-day) of 2 or more months.

       

      Is that more clear ? I hope so ... :)

       

      Thank you for any advise

      • v-jiascu-msft's avatar
        v-jiascu-msft
        Microsoft Employee

        Hi Tigex,

         

        I attached the file here: https://1drv.ms/u/s!ArTqPk2pu-BkgQzkLSKO_LWuXijo, which would be a clear explanation. 

        1. One date table (Calendar) and your data table (table1);

        2. 12 measures. (copy and paste, then change 1 to 2 - 12).

        January =
        CALCULATE (
            SUM ( Table1[Value] ),
            FILTER ( 'Calendar', MONTH ( 'Calendar'[Date] ) = 1 )
        )

        3. Create a visual.

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

        Best Regards!

        Dale