Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
astano05
Helper III
Helper III

Filter table based on measure

I have a table of open orders with entry date, quantity, order number, etc. This is connected to a customer table and an item table. 

 

I have a single select slicer for entry date. This filters the report for the Top 15 Items with measures for the Qty Sold on the Selected Date, and the sum of the Qty Ordered before the selected date. I have another table on the report grouped by customer with the same measures.

 

HEre are the measures:

Qty Ordered Selected Date =
Var SelectedDate = SELECTEDVALUE('Open Sales Orders Line'[ORDER_ENTRY_DATE])
Return
CALCULATE(sum('Open Sales Orders Line'[Quantity Ordered]),'Open Sales Orders Line'[ORDER_ENTRY_DATE]=SelectedDate)
 
Qty Ordered Before Selected Date =
var MinDate = CALCULATE(min('Open Sales Orders Line'[ORDER_ENTRY_DATE]),filter(all('Open Sales Orders Line'))
var SelectedDate = SELECTEDVALUE('Open Sales Orders Line'[ORDER_ENTRY_DATE])
Return
CALCULATE(sum('Open Sales Orders Line'[Quantity Ordered]),DATESBETWEEN('Open Sales Orders Line'[ORDER_ENTRY_DATE],MinDate,SelectedDate))-[Qty Ordered Selected Date]
 
All of this works properly. But now I want another table at the bottom that has the individual order information (entry date, order number, item, quantity) - however with the slicer for entry date, this filters the table for just that one date but I need everything from the selected date to all dates prior. If I remove the interaction of the slicer, I will get orders after the selected date. 
 
Is there any way to accomplish this?
1 REPLY 1
v-yangliu-msft
Community Support
Community Support

Hi  @astano05 ,

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.