Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi Team,
I'm unable to get the headcount for the required condition.
This is my formula
Hi @Rajkumar07 ,
Please new a calendar table first, like:
Calendar =
ADDCOLUMNS(
CALENDAR(DATE(2022,1,1),DATE(2022,12,31)),
"Month",FORMAT([Date],"mmmm"),
"Month Number",MONTH([Date])
)
Relationship:
then new a measure:
X Headcount =
VAR __MONTH =
MAX ( 'Calendar'[Month Number] )
VAR __X =
CALCULATE (
COUNTROWS ( 'StarterTable' ),
MONTH ( 'StarterTable'[Date Relation] ) <= 1
)
VAR __Y =
CALCULATE (
COUNTROWS ( 'StarterTable' ),
MONTH ( 'StarterTable'[Date Relation] ) <= __MONTH
)
- CALCULATE (
COUNTROWS ( 'LeaverTable' ),
MONTH ( 'LeaverTable'[Date Relation] ) <= __MONTH
)
VAR __RESULT =
DIVIDE ( __X + __Y, 2 )
RETURN
__RESULT
apply the measure with 'calendar'[month] to the table visual, resilt:
The PBIX file is attached for reference.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
Hi, can you please past some sample data of your table EIR?
Hi,
Thank you for your qucki reply,
This is how look my sample data
I have a sperate Starter and Leaver Table this also looking like same.
Here is my requirement have to find the Attrition %
I'm already having the Leavers count which numerator value. I need to find the Denominator.
Like my first request.
Could you please help me to get it?
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 51 | |
| 37 | |
| 35 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 65 | |
| 39 | |
| 33 | |
| 23 |