The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi All,
I have a cool formula here but i'm having trouble converting it to a distinct count
I want to change the below into a distinctcount of a column called [Worker] - how can i change this?
Tenure by Day (Count over 365 days) =
VAR SoM=min('Calendar'[Date])
VAR EoM=max('Calendar'[Date])
RETURN countx(CALCULATETABLE(MainTable,All('Calendar'),filter(MainTable,(DATEDIFF(MainTable[Start Date],EoM,DAY)>=365)),MainTable[Start Date]<=EoM,ABS(
MainTable[End Date]>=SoM)),DATEDIFF(MainTableDE[Start Date],EoM,DAY))
Solved! Go to Solution.
@doubleclick , Try like
calculate( distinctcount(MainTableDE[Worker]) ,All('Calendar'),filter( MainTable,(DATEDIFF(MainTable[Start Date],EoM,DAY)>=365)),MainTable[Start Date]<=EoM,ABS(
MainTable[End Date]>=SoM))
Hello,
i want transformed countx to distinctcount in this formule :
@doubleclick , Try like
calculate( distinctcount(MainTableDE[Worker]) ,All('Calendar'),filter( MainTable,(DATEDIFF(MainTable[Start Date],EoM,DAY)>=365)),MainTable[Start Date]<=EoM,ABS(
MainTable[End Date]>=SoM))
Thank you so much!!!! This fixed it - Issue Resolved!
User | Count |
---|---|
25 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
12 | |
10 | |
10 | |
9 |