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
AishwaryaS
Frequent Visitor

Slicer Interaction

Hi,

 

I have a 2 tables like below:

 

Table 1:

ItemIDQty
TV 1002  4
TV 1003  12

 

Table 2:

Item  IDStock Qty    Date
TV  1002 12 11.03.2021
TV  1003 5 12.03.2021
TV  1003 3

 12.03.2021

 

In the Power BI Report I show the below table with ID as a Slicer:

 

when no selection is made on the slicer the table should appear as below by taking the sum of Quantity of table1 and max of date of table2 for the particular item.

 

Item Qty    Date   StkQty
TV 16   12.03.2021    20

 

when ID=1002 is chose in the slicer the table should appear as below:

 

Item  Qty  Date  StkQty
TV  4  11.03.2021  12

 

Thanks in advance!

2 ACCEPTED SOLUTIONS
sayaliredij
Super User
Super User

1. Make connection between Table 1 and Table 2 using ID

sayaliredij_0-1618149797723.png

 

Create measures as following

 

QTY = SUM(table1[Qty])

StkQty = SUM(table2[StockQty])

Mxdate = MAX(table2[date])

 

when you create table visualization you will get results as follows

 

sayaliredij_1-1618150207073.pngsayaliredij_2-1618150218683.png

Regards,

Sayali 

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





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

v-angzheng-msft
Community Support
Community Support

Hi, @AishwaryaS 

 

Try to create 3 measures below:

_Sum of Qty = SUM('Table 1'[Qty])
_Sum of Stock Qty = SUM('Table 2'[Stock Qty])
_MaxDate = MAX('Table 2'[Date])

Result:

v-angzheng-msft_0-1618276727296.jpeg

v-angzheng-msft_1-1618276727298.jpeg

 

Is this the result you want? Hope this is useful to you

Please feel free to let me know If you have further questions

 

 

Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-angzheng-msft
Community Support
Community Support

Hi, @AishwaryaS 

 

Try to create 3 measures below:

_Sum of Qty = SUM('Table 1'[Qty])
_Sum of Stock Qty = SUM('Table 2'[Stock Qty])
_MaxDate = MAX('Table 2'[Date])

Result:

v-angzheng-msft_0-1618276727296.jpeg

v-angzheng-msft_1-1618276727298.jpeg

 

Is this the result you want? Hope this is useful to you

Please feel free to let me know If you have further questions

 

 

Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

sayaliredij
Super User
Super User

1. Make connection between Table 1 and Table 2 using ID

sayaliredij_0-1618149797723.png

 

Create measures as following

 

QTY = SUM(table1[Qty])

StkQty = SUM(table2[StockQty])

Mxdate = MAX(table2[date])

 

when you create table visualization you will get results as follows

 

sayaliredij_1-1618150207073.pngsayaliredij_2-1618150218683.png

Regards,

Sayali 

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





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.