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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
PBI_newuser
Post Prodigy
Post Prodigy

How to list all serial number with same transaction number

Hi, I want to see all the same transcation number to appear on the table when one of the serial number is selected.

For example, when I select "B123", I can see the list of all serial number with the same transaction number. How to do so?

Expected Output when select "B123" on slicer.

Transaction NumberSerial Number
44001111A123
44001111B123
44001111C123

 

Raw Data:

Transaction NumberSerial Number
44001111A123
44001111B123
44001111C123
44002222A987
44002222B987
44002222C987
1 ACCEPTED SOLUTION

Hi @PBI_newuser,

Sure, please check the below steps:

1. Extract the 'Serial Number' to create a new tale as source of the slicer.

2. Write a measure to extract the selections from the slicer and compare them with the target table records.

Measure =
VAR selected =
    VALUES ( Selector[Serial Number] )
VAR currID =
    SELECTEDVALUE ( Table[Transaction Number] )
VAR idlist =
    CALCULATETABLE (
        VALUES ( Table[Transaction Number] ),
        FILTER ( ALLSELECTED ( Table ), [Serial Number] IN selected )
    )
RETURN
    IF ( currID IN idlist, "Y", "N" )

3. Use this measure on the table visual's 'visual level filter' to choose all "Y" result records.

Notice: Selector is the new table with all 'Serial Number' from table1.

If the above steps are also not suited for your requirement, please share a pbix file here so that we can coding formulas on it to share the sample similar to your data structures.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

8 REPLIES 8
v-shex-msft
Community Support
Community Support

Hi @PBI_newuser,

Did these suggestions help with your scenario? if that is the case, you can consider Kudo or accept the helpful suggestions to help others who faced similar requirements to find it more quickly.

If these also don't help, please share more detailed information to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi @v-shex-msft , would you mind to share a sample file for the suggested solution? Thanks.

Hi @PBI_newuser,

Did these suggestions help with your scenario? if that is the case, you can consider Kudo or accept the helpful suggestions to help others who faced similar requirements to find it more quickly.

If these also don't help, please share more detailed information to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi @PBI_newuser,

Sure, please check the below steps:

1. Extract the 'Serial Number' to create a new tale as source of the slicer.

2. Write a measure to extract the selections from the slicer and compare them with the target table records.

Measure =
VAR selected =
    VALUES ( Selector[Serial Number] )
VAR currID =
    SELECTEDVALUE ( Table[Transaction Number] )
VAR idlist =
    CALCULATETABLE (
        VALUES ( Table[Transaction Number] ),
        FILTER ( ALLSELECTED ( Table ), [Serial Number] IN selected )
    )
RETURN
    IF ( currID IN idlist, "Y", "N" )

3. Use this measure on the table visual's 'visual level filter' to choose all "Y" result records.

Notice: Selector is the new table with all 'Serial Number' from table1.

If the above steps are also not suited for your requirement, please share a pbix file here so that we can coding formulas on it to share the sample similar to your data structures.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Ashish_Mathur
Super User
Super User

Hi,

See if my solution here helps - Filter a column of a Pivot Table on a certain condition but also show other items from that column.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@PBI_newuser , This will work if you slicer of Serial Number comes from an indepdendent table

 

Try measure like 

Meausre  =

var _tab = summarize(filter(allselected(Table), Table[Serial Number] in values(Table[Serial Number])),  Table[Transaction Number])

return

countx(filter(allselected(Table), Table[Transaction Number] in _tab), Table[Transaction Number])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Hi @amitchandak , I am not sure how to apply this measure to the table?

HI @PBI_newuser,

You can break the relationship between slicer and raw table then you can write measure expression to get the selected value and use it to find out correspond category 'transaction' numbers.

After these steps, you can drag this measure to table visual and use it on 'visual level filter' to filter matched records:

Applying a measure filter in Power BI - SQLBI
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.