Forum Discussion

mottya's avatar
mottya
Frequent Visitor
3 years ago
Solved

Comparing between periods

Hi

 

I want to compare the selected period to the parallel period, but like this graph:

I like the chart will add the 2021 Q4 Oct with the capital, recurring, and Rent... amounts in the parallel period like this:

 


Can I do that?

Thanks

  • mottya , I that can slicer need to be on an independent date table

     

    //Date1 is independent Date table, Date is joined with Table
    new measure =
    var _max = maxx(allselected(Date1),Date1[Date])
    var _min = minx(allselected(Date1),Date1[Date])

    var _max1 = date(year(_max)-12, month(_max) , Date(_max) )

    var _min1 = date(year(_min)-12, month(_min) , Date(_min) )
    return
    calculate( sum(Table[Value]), filter('Date',  ('Date'[Date] >=_min && 'Date'[Date] <=_max) || 

    ('Date'[Date] >=_min1 && 'Date'[Date] <=_max1)

    ) )

     

    Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI

1 Reply

  • mottya , I that can slicer need to be on an independent date table

     

    //Date1 is independent Date table, Date is joined with Table
    new measure =
    var _max = maxx(allselected(Date1),Date1[Date])
    var _min = minx(allselected(Date1),Date1[Date])

    var _max1 = date(year(_max)-12, month(_max) , Date(_max) )

    var _min1 = date(year(_min)-12, month(_min) , Date(_min) )
    return
    calculate( sum(Table[Value]), filter('Date',  ('Date'[Date] >=_min && 'Date'[Date] <=_max) || 

    ('Date'[Date] >=_min1 && 'Date'[Date] <=_max1)

    ) )

     

    Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI