Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I'm trying to make a chart, similiar to the one below:
The goal is to dynamically categorize the customers into percentiles (top1%, top2% and so on). If we had 1000 customers let's say, I would need 1% to show the combined Volume of top10 customers, 2% to show the combined Volume of the #11-20 customers, and so on.
I have created a table for percentiles (which I use on x axis):
Then the following measure:
However, that only shows n-th Volume (i.e. the Volume of customer that's at 1% mark, at 2% mark, etc. What I need here though, is the aggregate of Volume for all customers between 0-1%, 1-2%, respectively.
I would appreciate your help a lot.
Try this. You might have to tweak it a bit:
Measure V2 =
VAR currentPerc_ = MAX ( 'Percentiles'[Percentile] )
VAR previousPerc_ =
CALCULATE (
MAX ( 'Percentiles'[Percentile] ),
'Percentiles'[Percentile] < currentPerc_
)
VAR currentVol_ = [Measure]
VAR previousVol_ = CALCULATE ( [Measure], 'Percentiles'[Percentile] = previousPerc_ )
RETURN
SUMX (
FILTER (
ADDCOLUMNS ( Sales, "res_", [Measure] ),
[res_] <= currentVol_
&& [res_] > previousVol_
),
[res_]
)
If it doens't work it would help if you share the pbix with the expected result, or a simplified version with mock data and an example with the expected result
Please mark the question solved 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.
Cheers
Hi @Sarunas
Create a new measure using the one you already have:
Measure_cumul =
SUMX (
VAR currentPerc_ =
MAX ( 'Percentiles'[Percentile] )
RETURN
CALCULATETABLE (
DISTINCT ( 'Percentiles'[Percentile] ),
'Percentiles'[Percentile] <= currentPerc_
),
[Measure]
)
Please mark the question solved 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.
Cheers
Hi, @AlB ,
Thanks for the reply.
I tried it out, but cumulative Volume is not exactly what I need here.
The rephrasesd problem is :
If we have 1000 customers, for 1% percentile my 'Measure' returns only the Volume of #10th Customer, while instead I need it to aggregate #1 to #10. For 2% percentile I need it to aggregate #11 to #20 respectively, and so on.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
14 | |
11 | |
8 | |
8 | |
8 |
User | Count |
---|---|
22 | |
13 | |
11 | |
10 | |
10 |