Forum Discussion

Luuk2's avatar
Luuk2
Frequent Visitor
4 years ago

Putting two different date values on one date range

Hi,

I'm trying to build a report where user can select two holidays to compare values during those holidays. I want to make the values of both holidays appear on the first selected holiday date range.

For example that's how it looks now:

 

 

 

 

 

 

 

 

 

 

 

 

And that's how I want it to look:

 

 

 

 

 

 

 

Thanks in advance.

2 Replies

  • Luuk2 , Assume these slicers are using two different independent date tables and a common date table for display

     

    2nd slicer values =
    var _max = minx(allselected(Date1), Date1[Date]) //first slicer min date because of holiday selection
    var _min = minx(allselected(Date2), Date2[Date]) // second slicer min date because of holiday selection 

    var _diff = datediff(_max, _min,day)
    return
    calculate(countrows(Table), dateadd(date[Date],-1*diff,day ), filter(Table, Table[Date] in allselected(Date2[Date]) ))

    • Luuk2's avatar
      Luuk2
      Frequent Visitor

      Hi,
      Thanks for the help. But here's what I get after using your measure. 

       

       

       

       

       

       

       

      It appears that total is correct but I can not see the data. Any suggestions ?