Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Having 2 types of Time on same Visual

Hello everybody,

 

I have a report where whe would like to compare the actual months against last FULL year data, something like the below table:

 

 

Sales Person NameFULL YEAR 2020 AVG CALLSJAN 2021 AVG CALLSFEB 2021 AVG CALLSMAR 2021 AVG CALLS
Jhonny5,333,23,5
Maria566,36,3
Albert3,8444

 

in the database I have a Calendar table and a Calls table (which has the Call Date and Call ID) , so, to calculate the AVG CALLS I sum  up the number calls in Calls Table and Divide by the number of DAys in Calendar table, no big issue until here. 

 

The issue starts when I want com compare how the Sales Person are evolving against LAST YEAR, I'm able to display on visual Month by Month, or Year by Year, but not with YEAR and MONTHS .... is it possible to make it ?

 

thanks i advance

  • Anonymous , if you have date in your table, You can try year behind measures like

     

    Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
    Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi amitchandak 

     

    Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))

    I created a table like 

    Sales Person NameJAN 2021 AVG CALLSYear Behin CallsFEB 2021 AVG CALLSYear Behin CallsMAR 2021 AVG CALLSYear Behin Calls
    Jhonny363,233,58
    Maria636,326,36
    Albert424145

     

     

    but not, I do not have a column for the LAST YEAR Total, and I don't want a column for every period from last year, so, I suposed I need something else to achieve what I want....

2 Replies

  • Anonymous , if you have date in your table, You can try year behind measures like

     

    Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
    Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi amitchandak 

       

      Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))

      I created a table like 

      Sales Person NameJAN 2021 AVG CALLSYear Behin CallsFEB 2021 AVG CALLSYear Behin CallsMAR 2021 AVG CALLSYear Behin Calls
      Jhonny363,233,58
      Maria636,326,36
      Albert424145

       

       

      but not, I do not have a column for the LAST YEAR Total, and I don't want a column for every period from last year, so, I suposed I need something else to achieve what I want....