cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
VD
Frequent Visitor

Match selected number in same table column

I am having table named as TABLE_1, I want output like, when user select Batch_Number "AT0164" then, it should check that Batch number in
Parent_Order_Number column and should return a rows that matches with Batch_Number "AT0164" and so on same for all batch numbers.

Please refer attached image.

 

Help.PNG

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@VD , best is you have an independent batch table and create a measure like this and add this with all un summarized columns  in a table visual

 

measure =
var _max = maxx(allselected(Batch_Number),Batch_Number[Batch_Number])
return
calculate(count(Table[Batch_Number]), filter(Table, table[parent_order_number] = _max))

 

 

or with same table batch_number as slicer 

 

measure =
var _max = maxx(Table(Batch_Number),Table[Batch_Number])
return
calculate(count(Table[Batch_Number]), filter(Table, table[parent_order_number] = _max), removefilters(Table[Batch_Number]) )

 

refer Need of an Independent Table in Power BI: https://youtu.be/lOEW-YUrAbE

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin

Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

View solution in original post

5 REPLIES 5
PoojaDarbhe
Resolver I
Resolver I

Hi VD,

 

You can implement this as follows, I have used this in one of my project the same scenario was there

Steps : 

1) Create single column table having distinct values of batch_no as "Batch"

2) Create duplicate table of TABLE_1 as Dup_TABLE_1

3) Create relation in Batch[batch_no] and TABLE_1[batch_no]

4) Create relation in Batch[batch_no] and Dup_TABLE_1[parent_order_no]

5) Take a slicer having values from Batch table

Hope it solves your problem. Let me know in case of any help in implementing or it is working for you or not.

 

Best regards,

Pooja Darbhe

VD
Frequent Visitor

@PoojaDarbhe Thanks, i did the same and it's working for me.

Good to hear that @VD.

 

As this solution is working for you, it will be great if you accept the solution. Thanks a lot.

 

Best regards,

Pooja Darbhe

amitchandak
Super User
Super User

@VD , best is you have an independent batch table and create a measure like this and add this with all un summarized columns  in a table visual

 

measure =
var _max = maxx(allselected(Batch_Number),Batch_Number[Batch_Number])
return
calculate(count(Table[Batch_Number]), filter(Table, table[parent_order_number] = _max))

 

 

or with same table batch_number as slicer 

 

measure =
var _max = maxx(Table(Batch_Number),Table[Batch_Number])
return
calculate(count(Table[Batch_Number]), filter(Table, table[parent_order_number] = _max), removefilters(Table[Batch_Number]) )

 

refer Need of an Independent Table in Power BI: https://youtu.be/lOEW-YUrAbE

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin

Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

View solution in original post

VD
Frequent Visitor

@amitchandak, Thanks for the solution. 

I have created new table with single column Batch and join that table with actual table and it's working perfectly fine.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.