Forum Discussion
Getting selected Month from a slicer
- 2 years ago
Did you create a measure? From your file:
Your screenshot shows a summarized column, not a measure.
Thanks for the reply but it give me an error, cannot find name Business Unit
The expression contains columns from multiple tables, but only columns from a single table can be used in a True/False expression that is used as a table filter expression.
I'm sure that I use 'Months'[MonthName] in the slicer
I belive that my code main issue in getting the selected value from the slicer not filtring the data.
Oh, sorry, indeed, it will give an error since it's a measure. Try this:
EmpCount =
var mon = SELECTEDVALUE('Months'[MonthName])
VAR data =
CALCULATE(
COUNT(MainData[Employee Id]),
MainData[Business Unit] = SELECTEDVALUE(Joiners[Business Unit]),
MainData[Hiring Month] = mon
)
RETURN data
- yousef_alsalem2 years agoNew Member
Theres is no slice for the business unit.
In the next step I will have to add more filters, like by year and quarter etc.
I have added a dummy file at the end of my post.- ERD2 years ago
Community Champion
Actually there is, and you can see it on your screenshot:
- yousef_alsalem2 years agoNew Member
It gives no result
:1023034i5BA7A9B07F2833B1: