Forum Discussion
Filtering a table with user entered input date
Hi Experts
Please help me to find how we can filter a table based on user entered date.
I have created a new 'Date' table in Power BI which gives me a 'date field'. I have created a slicer using 'Date' field in my report.
Now when the user selects a single date in the slicer, my table should get filter according to that.
There are some DAX calculations in the table like Total Sales and some DAX buckets.
Thanks in advance.
Regards
Hi,
Ensure that the relationship is from the OrderDate column of the Sales Table to the Date column of the Calendar Table. Also, the relationship status should be active. Furthermore, you should be able to simplify your formula to:
=if([PostingDate - User Input Date]<0,CALCULATE(Sum('Sales'[Amount ]),[WhatIsTheAge]>=1,[WhatIsTheAge]<31,[Item Status] = "O"),0)
8 Replies
- anandavSkilled Sharer
Have you estblished relationship between your fact table and the 'Date' table?
You need to establish the relationship so that the Date slices selction can filter your fact table.
- Divya904Helper III
Hi Anandav
Thanks for replying back.
yes, i have established a relationship between fact table and 'Date' table
Thanks
- Ashish_MathurSuper User
Hi,
Share the link from where i can download your PBI file.
- ChandeepChhabraImpactful Individual
Divya904, Can you share the end result that you are expecting along with some dummy data