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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.