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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
tmendoza
Resolver I
Resolver I

Dashboard showing aggregates when I need individual amounts due to between time slider

Hello All,

 

I've got a data set that has categories in a column such as Net Revenue, Gross Margin, Head Count etc. and the amount to these in a separate column. There is also a column for the period that these amounts sit in.

So my data set is in such order: Periods, Categories, Amount.

I'm displaying a vertical barchart as a visual to express the amounts. I'm using a between periods slicer to select desired periods. I've got another category slicer that shows all the categories I mentioned above. The categories slicer is on single select, so everytime I pick a category, the vertical bar chart changes to show the amount of the category selected.

 

 These work fine for individual periods, but when my slider is picking between two periods things go a little hay wire. Let's say I pick April - September. Everyting in the categories other than Head Count are fine, because the chart is aggregating the amounts and that's fine. However, Head Count aggregates all the employes counted in our company at the end of each month and I get a very large number that is significantly more than the employees we had at the end of September.

 

So that's what I'm looking for, a method that will allow me to only show the amount of employees at the end of the month for HC while aggregating the amounts for all the other categories that are selected when the Period slicer is picking between two periods.

 

Any Ideas?

 

 

1 ACCEPTED SOLUTION
sturlaws
Resident Rockstar
Resident Rockstar

Hi @tmendoza,

 

you would need to do something like 

 

headCount =
CALCULATE (
    COUNT ( 'Table'[EmployeeID] );
    FILTER (  'Table' ; 'Table'[period] = MAX ( 'Table'[period] ) )
)

 cheers,
S

View solution in original post

2 REPLIES 2
sturlaws
Resident Rockstar
Resident Rockstar

Hi @tmendoza,

 

you would need to do something like 

 

headCount =
CALCULATE (
    COUNT ( 'Table'[EmployeeID] );
    FILTER (  'Table' ; 'Table'[period] = MAX ( 'Table'[period] ) )
)

 cheers,
S

Worked like a charm!!!!

Except, instead of using COUNT, I used SUM to aggregate the head count in the MAX Period.

 

My final Equation was:

Actual Value = 
IF(
          SELECTEDVALUE('Category Group Tbl'[Category Group])= "HC",
             CALCULATE(SUM(GL[Actual Amount]),FILTER(GL,GL[Period] = MAX('Period Tbl'[Period]))),
SUM(GL[Actual Amount])
)

THANK YOU!!!!!!! THANK YOU!!!!! THANK YOU!!!!!! THANK YOU!!!!!!!

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors