Forum Discussion
Create a graph for year end and current year
Hi everyone,
I want to create this graph in Power BI where I have every Dec numbers only for the past 3 years, and for current year I will have data from Jan to (Max Month in Current Year).
Currently I have a date table and the value for current year will change based on the date slicer that I have i.e. if I choose Sep-21, the graph will show Dec-18, Dec-19, Dec-20, Jan-21 to Sep-21 something like this:
This is my formula now but it can only show Dec data and current month. I dont know how to pass any date measure to show current year data as well.
I have look around but I cant find the answer that I want. If you have seen this solved before OR you know how to do this, pls let me know.
Thanks so much for your help!
Ee Idris
eeidris , Such a dynamic grouping based on selection is difficult
You can have static one line till last year display year and for this year display month
New column = if(year([Date]) < year(today()) , format([Date],"YYYY") , format([Date],"MMM-YYYY") )
sort on
Sort Column = if(year([Date]) < year(today()) , format([Date],"YYYY\0\0") , format([Date],"YYYYMM") )
1 Reply
- amitchandak
Super User
eeidris , Such a dynamic grouping based on selection is difficult
You can have static one line till last year display year and for this year display month
New column = if(year([Date]) < year(today()) , format([Date],"YYYY") , format([Date],"MMM-YYYY") )
sort on
Sort Column = if(year([Date]) < year(today()) , format([Date],"YYYY\0\0") , format([Date],"YYYYMM") )