Reply
Imandoost
New Member
Partially syndicated - Outbound

To exctract all the OrderIDs from a customer by searching for a OrderID

Hi PBI Experts, 
I have a table with two columns CustomerID and OrderID. I want to get all the OrderIDs related to a customer when I search for a OrderID. How can I achieve this in PBI?
Thanks in advance!

 

7 REPLIES 7
Cookistador
Solution Supplier
Solution Supplier

Syndicated - Outbound

Hello @Imandoost 

Does it solved your issue?
If it the case, can you accept my previous post as a solution

If it is not, let me know if you need more support

Syndicated - Outbound

Hi @Imandoost,

 

Thanks @Cookistador for Addressing the issue.

 

we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Regards,
Vinay Pabbu

Syndicated - Outbound

Hi @Imandoost,

 

we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Regards,
Vinay Pabbu

Imandoost
New Member

Syndicated - Outbound

Hi, Thansk for the quick reply! Indeed, that is the informatrion i was looking for! However, I wonder if it's possible to get this related OrderIDs by a calculated table or something similar, instead of a measure. I like to show Order details related to these OrderIDs.

If you need, you can aslo use the measure in a matrix or a table

Cookistador_0-1743588174150.png

 

Thanks a lot for the explanation. I mean to show the details of the related OrderIDs rather than showing them all in one measure. Something like a dynamic table which gets updated based on the selection would be the best solution. 

Cookistador
Solution Supplier
Solution Supplier

Syndicated - Outbound

Is it what you are trying to achieve?

Cookistador_0-1743534768582.png

 

The first table, I used to click on a value, the second to let your check each order associated to each customer

 

And the card is the result

 

If it is what you need, this is the dax I used

RelatedOrderIDs =
VAR CurrentOrderID = SELECTEDVALUE('Orders'[OrderID])
VAR CurrentCustomerID =
    CALCULATE(
        SELECTEDVALUE('Orders'[CustomerID]),
        'Orders'[OrderID] = CurrentOrderID
    )
VAR RelatedOrderIDsList =
    CALCULATE(
        CONCATENATEX(
            FILTER(
                'Orders',
                'Orders'[CustomerID] = CurrentCustomerID
            ),
            'Orders'[OrderID],
            ", "
        ),
        ALL(Orders)
    )
RETURN
    RelatedOrderIDsList
 
Let me know if it is not what you are trying to  achieve, and give a clear example
avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)