Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Calendar Slicer - Only Display Selectable Months with Data

Dear Group:   I tried to post this, but the website errored out, so if it is a duplicate, please accept my apologies.     Please understand, I am new to Power BI and this is my first report, so i...
  • DataInsights's avatar
    DataInsights
    6 years ago

    Anonymous, try this:

     

    Two fact tables:

    Sales_US

    Sales_Other

     

    Create a calculated table:

     

    SalesDates = 
    VAR DatesUS =
        SELECTCOLUMNS ( Sales_US, "Date", Sales_US[Date] )
    VAR DatesOther =
        SELECTCOLUMNS ( Sales_Other, "Date", Sales_Other[Date] )
    VAR DatesAll =
        UNION ( DatesUS, DatesOther )
    VAR DatesDistinct =
        DISTINCT ( DatesAll )
    RETURN
        DatesDistinct

     

    Join the calculated table to the date table:

     

     

    Create matrix. The row field should be Date from the date table (not the calculated table).

     

    Create slicer using the calculated table.