Forum Discussion

Tine82's avatar
Tine82
Helper I
4 months ago
Solved

Date filters for Visualization

Hi PBI Community,

 

I have 3 Date filters on one Page , to have the option to Filter by

  • Order Date
  • Delivery Date
  • Loading date

For the EndUsers , it is not clear which filter he used
and when he filter by Order Date e.g Today , did he need also to change the other 2 Date filters to see all orders from today ?
The used Filters show for the End Users not good.

 

Are there any nicer or more effective filters? 

Regads and thanks for helping 

Tine82

 



  • Hi Tine82 ,

     

    Instead of creating separate slicers for all dates, I've used a single date from Date table.

     

    I've also created a separate date type table to use that in a slicer. now user can see the data by filtering date type from slicer. also check the measure "Sales by Selected Date" which is considering the date type selected.

     

    See attached .pbix file, let me know if this is the solution you are looking for.

     

    ๐ŸŒŸ I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
    ๐Ÿ’ก Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
    ๐ŸŽ– As a proud SuperUser and Microsoft Partner, weโ€™re here to empower your data journey and the Power BI Community at large.
    ๐Ÿ”— Curious to explore more? [Discover here].
    Letโ€™s keep building smarter solutions together!

14 Replies

  • Hi Tine82 ,

     

    Instead of creating separate slicers for all dates, I've used a single date from Date table.

     

    I've also created a separate date type table to use that in a slicer. now user can see the data by filtering date type from slicer. also check the measure "Sales by Selected Date" which is considering the date type selected.

     

    See attached .pbix file, let me know if this is the solution you are looking for.

     

    ๐ŸŒŸ I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
    ๐Ÿ’ก Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
    ๐ŸŽ– As a proud SuperUser and Microsoft Partner, weโ€™re here to empower your data journey and the Power BI Community at large.
    ๐Ÿ”— Curious to explore more? [Discover here].
    Letโ€™s keep building smarter solutions together!

  • grazitti_sapna , the filter in your Solution does not work correct.
    He only filtered by Order date .
    We want to select a date field ( Order Date or Delivery Date or Loading Date)  and filter all Data by that selected coloum 

    e.g when i set Date filter to 4.4.26
    and select Order date = Show Customer E
    Select Delivery Date = Show Customer B
    Select Loading Date = Show Customer D

    do you have here a soloution ?

    • grazitti_sapna's avatar
      grazitti_sapna
      Super User

      Hi Tine82,

       

      Just update this measure and it should work fine. Also attached updated .pbix solution.

       

      Sales by Selected Date =
      VAR SelectedType = SELECTEDVALUE('Date Type'[Date Type], "Order Date")

      RETURN
      SWITCH(
          SelectedType,

          "Order Date",
              CALCULATE(
                  [Total Sales]
              ),

          "Delivery Date",
              CALCULATE(
                  [Total Sales],TREATAS(VALUES('Date'[Date]),Sales[ Delivery Date ]), REMOVEFILTERS('Date'[Date])
              ),

          "Loading Date",
              CALCULATE(
                  [Total Sales],
                  TREATAS(VALUES('Date'[Date]), Sales[ Loading Date ]), REMOVEFILTERS('Date'[Date])
              )
      )
      • Tine82's avatar
        Tine82
        Helper I

        grazitti_sapna  thanks for your quick reply, but the solution does not work for my data.
         The filter works only for "Bestelldatum_date"
        Can you please have a look into and check what I did wrong and send the corrected PBI back ?
        How can i add my PBI Version here ?


        Thank you so much and greetings from germany

        Tine82