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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Value in bar chart is different from table total value

Hi,

I am trying to show my data using 2 visuals, table and bar chart. After expanding the date hierarchy, the data in my bar chart went from 705 to 703. I am expecting the last value to be 705 still.

cvld_0-1647418249496.png

I used the same measure for both

Current Employees = 
CALCULATE(COUNTROWS(Position),
    FILTER(VALUES(Position[Employee__r.Employment_Start_Date__c]), Position[Employee__r.Employment_Start_Date__c] <= MAX('Date'[Date])),
    FILTER(VALUES(Position[Employee__r.Employment_End_Date__c]), OR(Position[Employee__r.Employment_End_Date__c] >= MIN('Date'[Date]), ISBLANK(Position[Employee__r.Employment_End_Date__c]))))

 

I also tried this measure but still getting 703

Total Employees to date = calculate(SUMX ( VALUES ('Date'[Week End Date]), [Current Employees] ), ALLSELECTED('Date'[Date]))

 

Thank you in advance!

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , I think both should be max here

Current Employees =
CALCULATE(COUNTROWS(Position),
FILTER(VALUES(Position[Employee__r.Employment_Start_Date__c]), Position[Employee__r.Employment_Start_Date__c] <= MAX('Date'[Date])),
FILTER(VALUES(Position[Employee__r.Employment_End_Date__c]), OR(Position[Employee__r.Employment_End_Date__c] >= MAX('Date'[Date]), ISBLANK(Position[Employee__r.Employment_End_Date__c]))))

 

Min will year start date in context of 2022

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @amitchandak thanks for responding. i tried your measure but it is giving me 703 both when date hierarchy is collapsed and expanded

cvld_0-1647420671796.png

 

@Anonymous , the number 705 means, termination/end date before the start of the period.  that is different for the above and below that is why the diff is. No max date means termination on of before the last date, which same in both cases

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

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!

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.