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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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

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

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors