Forum Discussion
Date filters for Visualization
- 6 months ago
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_sapna5 months ago
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")
RETURNSWITCH(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])))- Tine825 months ago
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 germanyTine82
- grazitti_sapna5 months ago
Super User
Hi Tine82,
The .pnix i provided earlier is filtering the data as per the date selection, I am not sure how you are doing it, would be better if you can share your version so i can take a look, or if you can share the sample dataset so that i can create a version with you sample data.
you cannot directly attach it to a post. Instead, upload the file to a cloud storage service (such as Onedrive, Google Drive, or Dropbox), ensure the link is shared publicly, and paste the URL into your post.