Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Matrix: Measures in rows with time intelligence?

Hello,

 

i have different measures to calculate different values, e.g. sales, margin etc. I am using a date slicer, for filtering the current year and i display the measures as rows in a Matrix and now i want as columns Last Year, Current Year and Budget.

 

Current Year and Budget are no problem, but i cant display the values for last year - and i dont know how to construct the measure for it..

Is it even possible to to this?

 

                             Last Year | Current Year | Budget

_____________________________________________________

Sales Measure    |              |                        |

Margin Measure|               |                        |

 

 

Kind regards

Stephan

2 Replies

  • Anonymous , Create a date table and join that with your sale, Target and other tables

    Then using time intelligence you can have measure like. (change the measures as per need)

     

     

    example

    YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
    Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
    This year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR('Date'[Date]),"12/31"))
    Last year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"12/31"))

     

     

    Power BI — Year on Year with or Without Time Intelligence
    https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
    https://www.youtube.com/watch?v=km41KfM_0uA

     

    Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
    Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi amitchandak 

       

      thanks for your suggestion, but this works only if i am using using the measures as coloumns. But i want to use them as rows. If i use yours i get this:

      My question was if it is possible to get all 4 values with one measure in one row?

       

      Kind regards

      Stephan