Forum Discussion

jmadsen's avatar
jmadsen
Frequent Visitor
3 years ago

Date Slicer for Data Table from Multiple Sources

I have a report that brings in multiple queries from a SQL database, then brings puts them into a simple table.  I'm trying to add a date slicer to the report.  The queries only go back 90 days from the run date, so I created a calendar in PowerBI that goes back 90 days like this:

 

Calendar = CALENDAR(
TODAY()-90,
TODAY()-1
)
 
I then created relationships to all my query date fields.  However, when I select dates in my slider, my data vanishes.
 
Before Slicing:
 

After Slicing

 

 These are the relationships I created:

They're all set to Many to 1 and Single in cross filter direction.  I'm pretty sure this is where my issue is, as I'm not very familiar with cardinality.  Any assistance is appreciated.

 
 

 

 

3 Replies

  • aj1973's avatar
    aj1973
    Community Champion

    Hi jmadsen 

    That depends on what column Date you put into the slicer. You have too many columns date and each column or each date correspond to their specific data.

    • jmadsen's avatar
      jmadsen
      Frequent Visitor

      Amine,

       

      That's why I created the calendar, linked them to my data, and only put the calendar date into the slicer field.

      Is there a better way to do it?

      • aj1973's avatar
        aj1973
        Community Champion

        It's a good thing you have created a Calendar, I didn't mean otherwise. 

        In order to display data that apply for each Column date in the Master Table you need to create measures for using USERELATIONSHIP() function.