Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi all,
I am new in the PowerBi journey, I am trying to create a waterfall that display movement from based on a date value in a slicer,
in my measure I got the following error message and I am stuck to fix it, can you help me :
below the measure
FTE variance by MONTH =
var selectedMonth = SELECTEDVALUE('Period Available'[Period])
var selectedOMTYPE = SELECTEDVALUE(DIMBRIDGE[OM TYPE (FTE BRIDGE)])
return
SWITCH(selectedMonth,
SELECTEDVALUE(DimDate[EndMonth]),
SWITCH(selectedOMTYPE,
"1. HIRING / REHIRING", [1. HIRING / REHIRING],
"2. CHANGE IN THE CONTRACT TYPE", [2. CHANGE IN THE CONTRACT TYPE],
"3. CHANGE IN ACTUAL WORK % (FTE CHANGE)", [3. CHANGE IN ACTUAL WORK % (FTE CHANGE)],
"4. BACK FROM HOLD", [4. BACK FROM HOLD],
"6. INTERIM IN", [6. INTERIM IN],
"9. ONLY WS CHANGE IN", [9. ONLY WS CHANGE IN],
"9. TECH UNEXPLAINED", [9. TECH UNEXPLAINED],
"A. DEPARTURE", [A. DEPARTURE],
"B. CHANGE IN THE CONTRACT TYPE", 0,
"C. CHANGE IN ACTUAL WORK % (FTE CHANGE)", 0,
"D. ON HOLD", 0,
"F. INTERIM OUT", 0,
"X. ONLY WS CHANGE IN", 0,
"I. TECH UNEXPLAINED", 0,
[FTE M]
),
EOMONTH(SELECTEDVALUE(DimDate[EndMonth]),-1),
SWITCH(selectedOMTYPE,
"1. HIRING / REHIRING", 0,
"2. CHANGE IN THE CONTRACT TYPE", 0,
"3. CHANGE IN ACTUAL WORK % (FTE CHANGE)", 0,
"4. BACK FROM HOLD", 0,
"6. INTERIM IN", 0,
"9. ONLY WS CHANGE IN", 0,
"9. TECH UNEXPLAINED", 0,
"A. DEPARTURE", -1*[A. DEPARTURE],
"B. CHANGE IN THE CONTRACT TYPE", -1*[B. CHANGE IN THE CONTRACT TYPE],
"C. CHANGE IN ACTUAL WORK % (FTE CHANGE)", -1*[C. CHANGE IN ACTUAL WORK % (FTE CHANGE)],
"D. ON HOLD", -1*[D. ON HOLD],
"F. INTERIM OUT", -1*[F. INTERIM OUT],
"X. ONLY WS CHANGE IN", -1*[X. ONLY WS CHANGE OUT],
"I. TECH UNEXPLAINED", -1*[I. TECH UNEXPLAINED],
[FTE M-1])
)
Solved! Go to Solution.
Hi,
Thank you for your feedback, it sems working now,
I amr requesting a last support from powerBi community , I Try get the sum of previous month value based on Slicer selection my code return me blank and I do not understand why :
M-1 = Calculate( [FTE MTD], REMOVEFILTERS( DimDate[Date] ), 'Fact FTE'[Period Available] = EOMONTH( SELECTEDVALUE(DimDate[Date]),-1))
Hi,
Thank you for your feedback, it sems working now,
I amr requesting a last support from powerBi community , I Try get the sum of previous month value based on Slicer selection my code return me blank and I do not understand why :
M-1 = Calculate( [FTE MTD], REMOVEFILTERS( DimDate[Date] ), 'Fact FTE'[Period Available] = EOMONTH( SELECTEDVALUE(DimDate[Date]),-1))
@Fantmas , Try like
FTE variance by MONTH =
var selectedMonth = SELECTEDVALUE('Period Available'[Period])
var selectedOMTYPE = SELECTEDVALUE(DIMBRIDGE[OM TYPE (FTE BRIDGE)])
return
SWITCH(True() ,
selectedMonth =SELECTEDVALUE(DimDate[EndMonth]),
SWITCH(selectedOMTYPE,
"1. HIRING / REHIRING", [1. HIRING / REHIRING],
"2. CHANGE IN THE CONTRACT TYPE", [2. CHANGE IN THE CONTRACT TYPE],
"3. CHANGE IN ACTUAL WORK % (FTE CHANGE)", [3. CHANGE IN ACTUAL WORK % (FTE CHANGE)],
"4. BACK FROM HOLD", [4. BACK FROM HOLD],
"6. INTERIM IN", [6. INTERIM IN],
"9. ONLY WS CHANGE IN", [9. ONLY WS CHANGE IN],
"9. TECH UNEXPLAINED", [9. TECH UNEXPLAINED],
"A. DEPARTURE", [A. DEPARTURE],
"B. CHANGE IN THE CONTRACT TYPE", 0,
"C. CHANGE IN ACTUAL WORK % (FTE CHANGE)", 0,
"D. ON HOLD", 0,
"F. INTERIM OUT", 0,
"X. ONLY WS CHANGE IN", 0,
"I. TECH UNEXPLAINED", 0,
[FTE M]
),
selectedMonth = EOMONTH(SELECTEDVALUE(DimDate[EndMonth]),-1),
SWITCH(selectedOMTYPE,
"1. HIRING / REHIRING", 0,
"2. CHANGE IN THE CONTRACT TYPE", 0,
"3. CHANGE IN ACTUAL WORK % (FTE CHANGE)", 0,
"4. BACK FROM HOLD", 0,
"6. INTERIM IN", 0,
"9. ONLY WS CHANGE IN", 0,
"9. TECH UNEXPLAINED", 0,
"A. DEPARTURE", -1*[A. DEPARTURE],
"B. CHANGE IN THE CONTRACT TYPE", -1*[B. CHANGE IN THE CONTRACT TYPE],
"C. CHANGE IN ACTUAL WORK % (FTE CHANGE)", -1*[C. CHANGE IN ACTUAL WORK % (FTE CHANGE)],
"D. ON HOLD", -1*[D. ON HOLD],
"F. INTERIM OUT", -1*[F. INTERIM OUT],
"X. ONLY WS CHANGE IN", -1*[X. ONLY WS CHANGE OUT],
"I. TECH UNEXPLAINED", -1*[I. TECH UNEXPLAINED],
[FTE M-1])
)
Hi Amit,
it seems working now, I have an additional question, is it possible to do a dynamic title for the category,
When the user select the date he want to see, the column title will change depending of the selected date ?
Thank a lot for your support
Regards
Hi @Fantmas ,
Maybe you can use drill down function to do a dynamic title for the category.
When you drill down, the column title will change depending of the selected date.
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
23 | |
11 | |
10 | |
9 | |
8 |