Forum Discussion
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 ID | Date of Joining |
| 1 | 01-01-2018 |
| 2 | 02-02-2018 |
| 3 | 03-03-2018 |
| 4 | 04-04-2018 |
| 5 | 05-05-2018 |
| 6 | 06-06-2018 |
| 7 | 07-07-2018 |
| 8 | 08-08-2018 |
| 9 | 09-09-2018 |
| 10 | 10-01-2018 |
| 11 | 11-01-2018 |
| 12 | 12-01-2018 |
| 13 | 13-01-2018 |
| 14 | 14-01-2018 |
| 15 | 15-01-2018 |
Thanks,
Suguna.
Hello Anonymous, you can download your example file here: https://1drv.ms/u/s!AiiWkkwHZChHjxBXXjOHlWOSQtEH
3 Replies
- LivioLanzoSolution Sage
Hello Anonymous, you can download your example file here: https://1drv.ms/u/s!AiiWkkwHZChHjxBXXjOHlWOSQtEH
- AnonymousNot 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.
- AnonymousNot 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