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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Anonymous
Not applicable

Use X-axis values as condition in an aggregation inequality

Hi,

 

I have three columns of data: salesmanID, clientID, and signingDate. I'd like to build a line graph that shows total number of clients by month. There will be a slicer for the salesmanID so each salemans client population can shown. 

 

What ways could I aggregate the client populaton given the above information? 

 

Thoughts I had: Use the displayed month in the horizaontal axis as part of an inequality that checks if the signingDate is less than that month, then have PowerBI count the number of true inequalities. 

 

Thanks in Advance. 

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

To create a line graph showing the total number of clients by month with a slicer for salesmanID, you can follow these steps:

  1. Create a new Date table with a column for each month. You can use the CALENDAR function in DAX to create a date range.
  2. Create a relationship between the Date table and your original data table using the signingDate column.
  3. Create a measure to count the number of clients. You can use the COUNT function in DAX to count the number of clientID entries.
  4. Add a line chart visual to your report. Drag the Month column from the Date table to the Axis field, and the measure you created in step 3 to the Values field.
  5. Add a slicer visual to your report and drag the salesmanID column to the Field section of the slicer.

 

Here's an example of the DAX measure to count clients:

Client Count = COUNT('YourDataTable'[clientID])

Replace 'YourDataTable' with the name of your data table.

 

                                                                                                                                                         

Best Regards,

Stephen Tao

 

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

ToddChitt
Super User
Super User

I would do a CLUSTERED COLUMN chart. Put MONTH(Signing Date) on the X azis. Put Salesman ID as the Legend (that groups all salesman together in one Monthly cluster. Then for the Y Axis do a COUNT(CleintID).

 

Do you have sample data you can share?




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.