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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.