The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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.
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!
@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
Hi @amitchandak thanks for responding. i tried your measure but it is giving me 703 both when date hierarchy is collapsed and expanded
@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
User | Count |
---|---|
15 | |
13 | |
9 | |
6 | |
6 |
User | Count |
---|---|
27 | |
19 | |
13 | |
9 | |
5 |