Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Dynamic trend analysis based on the selected month

Hi everyone,

 

I want to have a line chart which shows trend of previous 12 months based on the selected month.

For eg: If I select Sep 2018 from the month slicer, the line chart should show count of employees from Oct 2017 to Sep 2018. The order of months in line chart should also be in the order Oct, Nov, ... , Jan, Feb, ... , Aug, Sep. This order is dynamic as it will change based on the month selected in the slicer.

Can someone help me with the logic to implement this.

Thanks in advance.

 

Sample data is as below. Apart from this I also have a master table for date, so its DateID is related (1 to many) to Date of Joining.

 

Emp IDDate of Joining
101-01-2018
202-02-2018
303-03-2018
404-04-2018
505-05-2018
606-06-2018
707-07-2018
808-08-2018
909-09-2018
1010-01-2018
1111-01-2018
1212-01-2018
1313-01-2018
1414-01-2018
1515-01-2018

 

Thanks,

Suguna.

3 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello LivioLanzo

       

      Thanks for sharing the file. The approach worked for me, but I actually didn't understand the logic of using VALUES(Dates[date]) in the measure Employees Joining (Last 12 Months).

      Can you please explain this?

       

      Thanks,

      Suguna.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi ,

      I just downloaded your pbi file and everything seems to be working but can we achieve it using the date dimension table which is already present in the model without even creating any other date dimension as other measures in my report are also dependent on the existing date dimension

      Can you enlighten us about this scenerio 

       Thanks and Regards
      Prabin Nepak