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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
jbrooi
Frequent Visitor

Follow status in a selected month and status change in the following months

Hi guys, can't seem to find the solution for this scenario. 

 

I want to filter a specific month, let's say Feb 2023. I'd like to see how many people have a status "Nieuw" in that month, and from that group of people how many have a status "Trainee" in that or any following month. I want to display that in a timeline, with a value for "Nieuw" in Feb 2023 and values for "Trainee" in Feb, March, April and so on. 

jbrooi_0-1709206319551.png

How to calculate the measures for this?

I'm stuck on specifying the "Nieuw" group in Feb 2023 in combination with showing the "Trainee" statuses in the other months. 

Thanks! 

 

I have a change table for the people and a connected Date table. The change table is like this:

KandidaatIDStatusstatusIDIngangsdatum
75041Nieuw751-2-2023 00:00
75042Nieuw751-2-2023 00:00
75043Nieuw751-2-2023 00:00
75044Nieuw751-2-2023 00:00
75045Nieuw751-2-2023 00:00
75046Nieuw751-2-2023 00:00
75046Trainee911915-2-2023 00:00
75047Nieuw751-2-2023 00:00
75048Nieuw752-2-2023 00:00
75049Nieuw752-2-2023 00:00
75050Nieuw752-2-2023 00:00
75051Nieuw753-2-2023 00:00
75051Trainee911915-2-2023 00:00
75052Nieuw753-2-2023 00:00
75053Nieuw753-2-2023 00:00
75054Nieuw753-2-2023 00:00
75055Nieuw753-2-2023 00:00
75056Nieuw753-2-2023 00:00
75057Nieuw755-2-2023 00:00
75058Nieuw755-2-2023 00:00
75059Nieuw755-2-2023 00:00
75060Nieuw756-2-2023 00:00
75061Nieuw756-2-2023 00:00
75062Nieuw756-2-2023 00:00
75063Nieuw756-2-2023 00:00
75064Nieuw756-2-2023 00:00
75064Trainee911914-2-2023 00:00
75065Nieuw756-2-2023 00:00
75066Nieuw756-2-2023 00:00
75067Nieuw756-2-2023 00:00
75068Nieuw756-2-2023 00:00
75068Trainee911911-4-2023 00:00
75069Nieuw756-2-2023 00:00
75070Nieuw756-2-2023 00:00
75071Nieuw757-2-2023 00:00
75072Nieuw757-2-2023 00:00
75073Nieuw757-2-2023 00:00
75074Nieuw757-2-2023 00:00
75074Trainee911913-2-2023 00:00
75075Nieuw757-2-2023 00:00
75076Nieuw757-2-2023 00:00
75077Nieuw757-2-2023 00:00
75078Nieuw757-2-2023 00:00
75078Trainee91199-3-2023 00:00
75079Nieuw757-2-2023 00:00
75079Trainee911915-2-2023 00:00
75080Nieuw757-2-2023 00:00
75081Nieuw757-2-2023 00:00
75082Nieuw758-2-2023 00:00
75083Nieuw758-2-2023 00:00
75084Nieuw758-2-2023 00:00
75085Nieuw758-2-2023 00:00
75086Nieuw758-2-2023 00:00
75087Nieuw758-2-2023 00:00
75088Nieuw758-2-2023 00:00
75088Trainee911921-2-2023 00:00
75089Nieuw758-2-2023 00:00
75090Nieuw758-2-2023 00:00
75090Trainee911913-2-2023 00:00
75091Nieuw758-2-2023 00:00
75092Nieuw758-2-2023 00:00
75093Nieuw758-2-2023 00:00
75094Nieuw759-2-2023 00:00
75095Nieuw759-2-2023 00:00
75096Nieuw759-2-2023 00:00
75097Nieuw7510-2-2023 00:00
75098Nieuw7510-2-2023 00:00
75098Trainee911915-2-2023 00:00
1 ACCEPTED SOLUTION
jbrooi
Frequent Visitor

Ah found it, didn't apply the ALL function in the right way. This gives me the right result:

Trainees from selected month = 

Trainees uit geselecteerde maand =
VAR NieuweKandidaten =
    CALCULATETABLE(
        VALUES('EmployeeChange'[KandidaatID]),
        'EmployeeChange'[Status] = "Nieuw"
    )
RETURN
    CALCULATE(
        COUNTROWS('EmployeeChange'),
        ALL(EmployeeChange),
        'EmployeeChange'[Status] = "Trainee",
        'EmployeeChange'[KandidaatID] IN NieuweKandidaten
    )

View solution in original post

2 REPLIES 2
jbrooi
Frequent Visitor

Ah found it, didn't apply the ALL function in the right way. This gives me the right result:

Trainees from selected month = 

Trainees uit geselecteerde maand =
VAR NieuweKandidaten =
    CALCULATETABLE(
        VALUES('EmployeeChange'[KandidaatID]),
        'EmployeeChange'[Status] = "Nieuw"
    )
RETURN
    CALCULATE(
        COUNTROWS('EmployeeChange'),
        ALL(EmployeeChange),
        'EmployeeChange'[Status] = "Trainee",
        'EmployeeChange'[KandidaatID] IN NieuweKandidaten
    )
amitchandak
Super User
Super User

@jbrooi , Create a disconnected date table

 

Measure =
Var _sel = Eomonth(maxx(allselected(Date), Date[Date]), 0)
return
countrow(filter(Table, Table[Status]="Nieuw" && eomonth(Table[Ingangsdatum],0)= _max)) + countrow(filter(Table, Table[Status]="Trainee" && eomonth(Table[Ingangsdatum],0)> _max))

 

Need of an Independent/disconnected Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.