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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

Summarize table showing Empty Values

Hello!

I am trying to summarize a table that contains customer ID data, Order ID, Item ID, and a ranking that classifies each customer's orders (from the first to the last order) - (I created a fake table to preserve my data):

lukeoliveira_0-1618854789706.png

When I summarize this table to find the item bought per client in the first order (

SUMMARIZE(filter('Summary Clientes','Summary Clientes Pedidos'[Rank]=1)

, I achieve this:

lukeoliveira_1-1618854930371.png

However, my "problem" is when I summarize this table looking to find the items purchased in the second purchase. The client ID "3" has just one order, and when I summarize this power bi does not show this ID.

How can I create a table that shows all the second orders per customer and, if any customer ID has only one purchase, Power Bi shows me an empty cell, like this:

lukeoliveira_2-1618855202125.png

 

I really appreciate your help.

Tks in advance.

 

Lucas

 

 

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi @Anonymous ,


You could create a measure by the following formula:

Newtable=
var _summarize=SUMMARIZE(FILTER('Summary Clientes',[Rank Order]=2),[Client ID],[Item ID])
var _ClientID=SELECTCOLUMNS(_summarize,"ID",[Client ID])
var _ID=DATATABLE("ID",INTEGER,{{1},{2},{3}})
var _union=DATATABLE("Client ID",INTEGER,"Item ID",INTEGER,{{1, },{2, },{3, }})
var _except=EXCEPT(_ID,_ClientID)
return UNION(_summarize,FILTER(_union,[Client ID] in _except))

The final output is shown below:
summrize.jpg
Best Regards,
Community Support Team_ Yalan Wu
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-yalanwu-msft
Community Support
Community Support

Hi @Anonymous ,


You could create a measure by the following formula:

Newtable=
var _summarize=SUMMARIZE(FILTER('Summary Clientes',[Rank Order]=2),[Client ID],[Item ID])
var _ClientID=SELECTCOLUMNS(_summarize,"ID",[Client ID])
var _ID=DATATABLE("ID",INTEGER,{{1},{2},{3}})
var _union=DATATABLE("Client ID",INTEGER,"Item ID",INTEGER,{{1, },{2, },{3, }})
var _except=EXCEPT(_ID,_ClientID)
return UNION(_summarize,FILTER(_union,[Client ID] in _except))

The final output is shown below:
summrize.jpg
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

AlB
Community Champion
Community Champion

Hi @Anonymous 

Can you

1. Share the first table in text-tabular format, so that the contents can be copied? Just copy from Excel/PBI and paste here

2. Show the full code you are using to generate the summarized tables  

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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