Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello,
I have a table like below that shows employee's skills and their proficiency. I report it only for 3 past months so here, number 3 is actual month on which I need to focus.
I need to create measures showing how many "skills-ups" I have. So for example if I change from "Begginer" to "Expert" from month 2 to 3 I need something like that: "Begginer -> Expert" - count: 1 . In case of User3 it would be "Expert -> Master" - count: 1. Of course if nothing changes like from month 1 to 2(user kosekk_g), than nothing is reported. I also need to take under consideration that employees come and go so it needs to calculate only when there is a record for past month.
I will appriciate any advice how to accomplish that.
Solved! Go to Solution.
Hi @Anonymous
Please refer to sample file with the solution https://www.dropbox.com/t/2iLtuoha7iXEEtSw
skills-ups =
SUMX (
Data,
VAR CurrentNameAndSkilTable = CALCULATETABLE ( Data, ALLEXCEPT ( Data, Data[Name], Data[Skill] ) )
VAR CurrentDateIndex = Data[Date_Index]
VAR CurrentProfRank = RELATED ( Proficiency_Ranks[Rank] )
VAR PreviousPrfofficiency = MAXX ( FILTER ( CurrentNameAndSkilTable, Data[Date_Index] = CurrentDateIndex - 1 ), Data[Profficiency] )
VAR PreviousRank = MAXX ( FILTER ( ALL ( Proficiency_Ranks ) , Proficiency_Ranks[Profficiency] = PreviousPrfofficiency ), Proficiency_Ranks[Rank] )
VAR Result =
IF (
PreviousRank <> BLANK ( ) && CurrentProfRank > PreviousRank,
1,
0
)
RETURN
Result
)
Hi @Anonymous
I believe this should work
skills-ups =
SUMX (
Data,
VAR CurrentNameAndSkilTable = CALCULATETABLE ( Data, ALLEXCEPT ( Data, Data[Name], Data[Skill] ) )
VAR CurrentDateIndex = Data[Date_Index]
VAR CurrentProfRank = RELATED ( Proficiency_Ranks[Rank] )
VAR PreviousPrfofficiency = MAXX ( FILTER ( CurrentNameAndSkilTable, Data[Date_Index] = CurrentDateIndex - 1 ), Data[Profficiency] )
VAR PreviousRank = MAXX ( FILTER ( ALL ( Proficiency_Ranks ) , Proficiency_Ranks[Profficiency] = PreviousPrfofficiency ), Proficiency_Ranks[Rank] )
VAR Result =
IF (
PreviousRank <> BLANK ( ) && CurrentProfRank - PreviousRank = 2,
1,
0
)
RETURN
Result
)
Hi @Anonymous
I believe this should work
skills-ups =
SUMX (
Data,
VAR CurrentNameAndSkilTable = CALCULATETABLE ( Data, ALLEXCEPT ( Data, Data[Name], Data[Skill] ) )
VAR CurrentDateIndex = Data[Date_Index]
VAR CurrentProfRank = RELATED ( Proficiency_Ranks[Rank] )
VAR PreviousPrfofficiency = MAXX ( FILTER ( CurrentNameAndSkilTable, Data[Date_Index] = CurrentDateIndex - 1 ), Data[Profficiency] )
VAR PreviousRank = MAXX ( FILTER ( ALL ( Proficiency_Ranks ) , Proficiency_Ranks[Profficiency] = PreviousPrfofficiency ), Proficiency_Ranks[Rank] )
VAR Result =
IF (
PreviousRank <> BLANK ( ) && CurrentProfRank - PreviousRank = 2,
1,
0
)
RETURN
Result
)
Thank you again. Everything works!
Hi @Anonymous
Please refer to sample file with the solution https://www.dropbox.com/t/2iLtuoha7iXEEtSw
skills-ups =
SUMX (
Data,
VAR CurrentNameAndSkilTable = CALCULATETABLE ( Data, ALLEXCEPT ( Data, Data[Name], Data[Skill] ) )
VAR CurrentDateIndex = Data[Date_Index]
VAR CurrentProfRank = RELATED ( Proficiency_Ranks[Rank] )
VAR PreviousPrfofficiency = MAXX ( FILTER ( CurrentNameAndSkilTable, Data[Date_Index] = CurrentDateIndex - 1 ), Data[Profficiency] )
VAR PreviousRank = MAXX ( FILTER ( ALL ( Proficiency_Ranks ) , Proficiency_Ranks[Profficiency] = PreviousPrfofficiency ), Proficiency_Ranks[Rank] )
VAR Result =
IF (
PreviousRank <> BLANK ( ) && CurrentProfRank > PreviousRank,
1,
0
)
RETURN
Result
)
Hello again!
@tamerj1 I was wondering if this solution could be aligned to count also "skillups" when they increase more than just one step. For example from "Begginer" to "Master" (skipping "Expert"). I've tried to experiment with your code but unfortunately I'm not that good while it comes to DAX..
Appriciate your help!
User | Count |
---|---|
84 | |
76 | |
74 | |
48 | |
39 |
User | Count |
---|---|
114 | |
56 | |
51 | |
42 | |
42 |