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
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
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.