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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
adrelich
New Member

Visual Calculation Based on Slicers Output

Hello,

 

I am trying to create a new visual calculation that divides a value in the visual by a number in a spreadsheet based on what Month is selected in a slicer I am using then get it to display as a percentage. For reference, I have a spreadsheet with most of my data in it, plus another spreadsheet with a Month/Year column and a Work Hours column to display the true work hours for that month. How do I get a visual calculation to determine which Month/Year is selected in the slicer I am using and find and look up that Month/Year in the spreadsheet and find the number of work hours in the other column. 

Simply put, I am trying to find the percentage of time spent (Hours) related to how many work hours there were for that month. 

Calculation = [Hours]/168*100
The above calculation would work if I took an average for each month (168), but not every month is the same and we are off on different holidays then the rest of the work force so we are unique. This is why I created a separate spreadsheet to record the true work hours for us for each month. I would like to get the formula to look up the output of the Month/Year slicer and find the related Work Hours value with the matching Month/Year. 

Any help is appreciated! I have been searching this forum and haven't find the right solution yet. 
2 REPLIES 2
quantumudit
Skilled Sharer
Skilled Sharer

Hi @adrelich 

You can use the SELECTEDVALUE() formula to obtain the current slicer value in context and then retrieve the hours. However, to assist you further, it would be beneficial if you could provide sample data or a PBIX file for reference.

 

You can anonymize the data.

 

Best Regards,
Udit

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudo 👍

🚀 Let's Connect: LinkedIn || YouTube || Medium || GitHub
Visit My Linktree: LinkTree

https://app.powerbi.com/groups/me/reports/fad4e539-e6bd-443b-ad17-d7761d7df280/6b61d959cee9ba68214a?... 

This link should work. I had tried using that formula but could not get it to function properly. 

Helpful resources

Announcements
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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.