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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
vs_7
Responsive Resident
Responsive Resident

how to calculate total customer count upto 80% sales

Hi,

 

I am trying to get all the customers count  whose sales upto  80% of total sale.

 

After much research, I think the steps are: 

 

1. Create a Rank on sales

2. Do a cumulative sales

3. Look for 80% of those cumulative sales.

 

I prefer below link but its not working, its showing blank value

 

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/b13a8ce5-c77d-43c2-8be4-7e300e02cdbc/count-...

 

please help i  am struggling from last 20 days.

 

 

8 REPLIES 8
vs_7
Responsive Resident
Responsive Resident

Hi @truptis ,

Appreciate for your response.

But it didnt worked for the required output.

truptis
Community Champion
Community Champion

@vs_7 Please see the codes provided by @Samarth_18 :
You need to create 3 new measures - 
50 % =
CALCULATE (
COUNT ( 'Table (4)'[customer code] ),
FILTER ( 'Table (4)', 'Table (4)'[cummulative] <= 50 )
)
80 % =
CALCULATE (
COUNT ( 'Table (4)'[customer code] ),
FILTER ( 'Table (4)', 'Table (4)'[cummulative] <= 80 )
)
100 % =
CALCULATE (
COUNT ( 'Table (4)'[customer code] ),
FILTER ( 'Table (4)', 'Table (4)'[cummulative] <= 100 )
)

vs_7
Responsive Resident
Responsive Resident

please help , i need show this calculation to my boss and i am stuck from last 20 days

Hi @vs_7 ,

 

What output do you expect? Based on the sample data you provide, @Samarth_18  measure can work.


Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

vs_7
Responsive Resident
Responsive Resident

hi @amitchandak @lbendlin @parry2k @Samarth_18 @truptis 

appreciate for your response but above data is shared is in exceel format.

I need all above calculations in DAX measures to get the required output.

i need to calculate cummulative sales, sales percentage, count upto 50, 80 percent from total sales contribution from customers from Turnover.

amitchandak
Super User
Super User
vs_7
Responsive Resident
Responsive Resident

hi @amitchandak @lbendlin @parry2k @Samarth_18 @truptis 

i have used all dax which is suggested and checked in the forum but i didnt  get exact customer count.

i have three financial year of data , here i am sharing one financial year of data is in exceel calculation format.

we need Dax calculation measures from below Exceel data.

you can see below data :

upto 50% sales customer count is 3

 

upto 80% sales customer count is 6

 

upto 100% sales customer count is 9

please help.

 

Financial yearcustomer codesalestotal sales% of salescummulative50%80%100% 
2019-2030BLU1220069,91,23,048.79 3,46,48,82,769.3520.1773920.177394025080100 
2019-20ME01A1097652,57,00,902.093,46,48,82,769.3515.1722635.349650555080100 
2019-2030STE0140039,09,52,693.553,46,48,82,769.3511.2832946.632938315080100 
2019-20SH05A1908036,34,04,455.303,46,48,82,769.3510.4882257.12115623 80100 
2019-20EARTH35,30,46,239.413,46,48,82,769.3510.1892767.31042562 80100 
2019-2030NED0220033,12,86,707.493,46,48,82,769.359.56126776.87169304 80100 
2019-2030KIN0140028,96,30,272.123,46,48,82,769.358.35902185.23071386  100 
2019-2030VAJ0440025,62,19,911.203,46,48,82,769.357.39476492.62547808  100 
2019-20FO06A1313925,55,18,539.403,46,48,82,769.357.394764100  100 

 

Samarth_18
Community Champion
Community Champion

Hi @vs_7 ,

 

Try to create a measure like this:-

50 % =
CALCULATE (
    COUNT ( 'Table (4)'[customer code] ),
    FILTER ( 'Table (4)', 'Table (4)'[cummulative] <= 50 )
)
80 % =
CALCULATE (
    COUNT ( 'Table (4)'[customer code] ),
    FILTER ( 'Table (4)', 'Table (4)'[cummulative] <= 80 )
)
100 % =
CALCULATE (
    COUNT ( 'Table (4)'[customer code] ),
    FILTER ( 'Table (4)', 'Table (4)'[cummulative] <= 100 )
)

 

output:-

Samarth_18_0-1647326173613.png

 

Thanks,

Samarth

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.