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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
baronraghu
Helper III
Helper III

Show duplicate data

Hi All,

 

I have the following data

 

Date        Customer name    product purchased     Amount spent

1/1/2017   David                       A                                   173

1/11/2017  Steve                       A                                    164

1/20/2017   Victor                     N                                     171

1/31/2017    David                     S                                    156

2/5/2017       Mark                    P                                   148

.

.

.

And so on a total of 200 rows with multiple duplicate value

 

I want to create a funnel chart which shows the top 10 spending customers irrespective of date or product

 

The reslut shoul be

 

Customer name  Amount PSent

David                    173

Victor                     171

Steve                     164

David                     156

Mark                     148 and so on

 

Could anyone help me on this

 

2 REPLIES 2
v-sihou-msft
Employee
Employee

@baronraghu

 

In this scenario, do you want to keep duplicate rows for same customer in your result set? Or you want to have the Amount spend aggregate on customer first. Then select the TOP 10 users?

 

If you want to keep the duplicates for same customer, you just need to use TOPN() on this table. 

 

 

Calculated Table = TOPN(10,Table,Table[Amount Spent])

If you need to aggregate your table on customer level.

 

Users Amount Spent= SUMMARIZE(Table,Table[Customer],"Total Amount Spent",CALCULATE(SUM(Table[Amount Spent])))

Then user TOPN on above calculated table.

 

Calculated Table = TOPN(10,'Users Amount Spent','User Amount Spent'[Total Amount Spent])

Regards,

 

 

 

@v-sihou-msft

 

thanks for your prompt reply.

 

I would like the keep duplicate rows for same customer in result set. I just want to know what were the top 10 spending amount irrespective of the date and who where those customers.

 

I tried the TopN function as suggested by you. I am getting this error  "The expression refers to multiple coulmn. Multiple coulmn cannot be converted into scalar value.

 

Thanks

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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