Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi,
I have issue with getting the selected value from a drop down list slicer.
I have a mesure in the Months table to catch the select value in the slicer
To test the code, this is working
Solved! Go to Solution.
Did you create a measure? From your file:
Your screenshot shows a summarized column, not a measure.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.
Check out my latest demo report in the data story gallery.
Stand with Ukraine!
Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/
Thank you!
@yousef_alsalem
Have you created the required relationship between the tables?
Sharing a dummy Power BI file representing your scenario would be beneficial. You can save the Power BI file on Google Drive or any other cloud storage platform and provide the link here. Kindly ensure that permission is granted to open the file.
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hi,
Linking the table in a relationship is not what I want, because this is part of a bigger project and some tables have no realtions. In the next step I will have to add more filter, like by year and quarter etc.
I have added a dummy file at the end of my post.
Thank you
Hi @yousef_alsalem ,
- make sure you use 'Months'[MonthName] in the slicer
- try rewrite the measure:
EmpCount =
var mon = SELECTEDVALUE('Months'[MonthName])
VAR data =
CALCULATE(
COUNT(MainData[Employee Id]),
MainData[Business Unit] = Joiners[Business Unit],
MainData[Hiring Month] = mon
)
RETURN data
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.
Check out my latest demo report in the data story gallery.
Stand with Ukraine!
Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/
Thank you!
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
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.
Check out my latest demo report in the data story gallery.
Stand with Ukraine!
Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/
Thank you!
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.
Actually there is, and you can see it on your screenshot:
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.
Check out my latest demo report in the data story gallery.
Stand with Ukraine!
Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/
Thank you!
It gives no result
:1023034i5BA7A9B07F2833B1:
Did you create a measure? From your file:
Your screenshot shows a summarized column, not a measure.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.
Check out my latest demo report in the data story gallery.
Stand with Ukraine!
Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/
Thank you!
Thank you it's working now
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.