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.
Hello. I am trying to recreate the below table in Power BI. To explain the data, shipping location A delivers to a total of 137 stores. 10 of those stores delivered on time 0-49% of the time, 13 of those stores delivered on time 50-59% of the time, etc.
How do I get the counts for each percentage range?
Shipping Location | 0 to 49% | 50 to 59% | 60 to 69% | 70 to 79% | 80 to 90% | 90 to 94% | 95 to 100% | Total Stores |
A | 10 | 13 | 15 | 31 | 16 | 15 | 37 | 137 |
B | 11 | 7 | 15 | 22 | 30 | 2 | 3 | 90 |
Solved! Go to Solution.
Hi, @jdwalker5
I have simulated the data to answer your question.
Measure:
Count =
COUNTROWS (
FILTER (
ALL ( 'Table' ),
[Range] = MAX ( 'Table'[Range] )
&& [Shipping Location] = MAX ( 'Table'[Shipping Location] )
)
)
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Share the link from where i can download your PBI file.
Hi, @jdwalker5
I have simulated the data to answer your question.
Measure:
Count =
COUNTROWS (
FILTER (
ALL ( 'Table' ),
[Range] = MAX ( 'Table'[Range] )
&& [Shipping Location] = MAX ( 'Table'[Shipping Location] )
)
)
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you for the reply. I ended up doing something similar to the approach you provided and it worked.
Hi @jdwalker5
Not sure how you model is setup but you can create a table with the percentages and the maximum and minimum values:
Thelast row is a little bit higher than 100% because has you can see in order to get all the value the maximim is equal to the minimum of the previous category.
Now add the following measure:
Total Stores =
COUNTROWS (
CALCULATETABLE (
GROUPBY( Detaisl, Detaisl[Store], Detaisl[Percentage] ),
Detaisl[Percentage] >= MIN ( 'Range Limits'[Minimum] )
&& Detaisl[Percentage] < MAX ( 'Range Limits'[Maximum] )
)
)
See attach PBIX file.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThanks for the reply. This would also work for what I needed so I will keep this in my toolbox!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
87 | |
65 | |
50 | |
45 |
User | Count |
---|---|
217 | |
88 | |
81 | |
65 | |
56 |