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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PaoloCantore
New Member

Create a summary table showing the articles bought by customers

Hello. I have a table in this shape:

CustomerArticleprice
PeterBread4
PeterMilk3
JulieMilk2
PeterCrackers3

 

Where the number of article is fixed (3 in this case bread, milk and crackers) and prices can be different for the same article. Every customer can buy an article only once. I need to create a table like this one where it is easy to check what articles a specific customer bought.

 

CustomerBreadbread priceMilkmilk pricecrackerscrakers price
Peteryes4yes3yes3
Julie  yes2  

 

So leaving the corresponding columns empty where nothing has been bought by a specific person.

Do you know how can I solve this problem with powerBi?

Thanks in advance to anyone that will give suggestion.

Best regards

Paolo

 

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@PaoloCantore,

 

This can be achieved with the measures below:

 

Bought = IF ( NOT ISBLANK ( MAX ( FactTable[Article] ) ), "yes" )
Price = MAX ( FactTable[price] )

 

Create matrix (use the measures in Values field well):

 

DataInsights_0-1700848980829.png

 

DataInsights_1-1700848997188.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
PaoloCantore
New Member

Dear Datainsights thank you very much for your precious help!

DataInsights
Super User
Super User

@PaoloCantore,

 

This can be achieved with the measures below:

 

Bought = IF ( NOT ISBLANK ( MAX ( FactTable[Article] ) ), "yes" )
Price = MAX ( FactTable[price] )

 

Create matrix (use the measures in Values field well):

 

DataInsights_0-1700848980829.png

 

DataInsights_1-1700848997188.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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