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
Anonymous
Not applicable

Count the number of values that are less than and above a certain value

I have a dropdown list of shares, when I click on a share I would like a pie chart to display that shows how many clients have shares that are greater than 1000000 and less than 1000000. So if I click on XYZ for example, a pie chart should show that 2 clients have shares greater than 1 million and 2 clients have shares less than 1 million.

 

Sample data:

Capture.PNG

1 ACCEPTED SOLUTION
Washivale
Resolver V
Resolver V

image.pngHi @Anonymous ,

 

create two measures as below and use it in the value section of your pie chart.

 

Holding_le = CALCULATE(COUNTROWS(Holdings), Holdings[Holding Quantity] <=1000000)
 
Holdings_gt = CALCULATE(COUNTROWS(Holdings), Holdings[Holding Quantity] >1000000)
 
if you want to count distinct customers, you can change countrows to distinctcount with code.
 
let me know if it works with your requirements.
 
Regards,
Washivale

 

 

 

 

 

View solution in original post

1 REPLY 1
Washivale
Resolver V
Resolver V

image.pngHi @Anonymous ,

 

create two measures as below and use it in the value section of your pie chart.

 

Holding_le = CALCULATE(COUNTROWS(Holdings), Holdings[Holding Quantity] <=1000000)
 
Holdings_gt = CALCULATE(COUNTROWS(Holdings), Holdings[Holding Quantity] >1000000)
 
if you want to count distinct customers, you can change countrows to distinctcount with code.
 
let me know if it works with your requirements.
 
Regards,
Washivale

 

 

 

 

 

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.