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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Ignore slicer filter and include hours thats not in same project

Hi,

I have a question that I'm not sure is possible, but trying anyways hoping someone has a clever workaround for this.

I have a table where i use slicers to get a spesific date and a Responsible_id. This filters that below table, which in theory is correct, however this Empl_id also worked 4 hours on Referencekey 4292 that same day. This is not showing when I use slicer for Responsible_id = 100.

I have included a second table where it is showing those 4 hours, but i have made that table ignore the slicer and added a filter for Empl_id = 100.

I would like my first table to show all reference key where selected Responsible_id is selected as well as where this id is not responsible but would show up in Empl_id. 

 

My measure for Total Hours is:

Total Hours = CALCULATE([All Hours],
FILTER(Table1,Table1[Empl_id] = SELECTEDVALUE(Table2[Responsible_id])))

 

DateNumberRefreencekeyResponsible_idTotal Hours Empl_idAll Hours
3/24/202010004293100 1248
3/24/2020100042931001210012
3/24/202012004293100 1114
Total   12 24

 

 

DateNumberRefreencekeyResponsible_idTotal Hours ResponsibleEmpl_idAll Hours
3/24/202010004292124 1004
3/24/2020100042931661210012
Total   12 16

 

Thanks!

4 REPLIES 4
v-easonf-msft
Community Support
Community Support

Hi , @Anonymous 

In the formula you mentioned ,are table 1 and table 2  the same table? Is  "All hours"  also  a measure?

Is this your excepted  result,when you use slicer for Responsible_id = 100?

DateNumberRefreencekeyResponsible_idTotal Hours Empl_idAll Hours
3/24/202010004293100 1248
3/24/2020100042931001210012
3/24/202012004293100 1114
3/24/202010004292124 1004
Total   12 28

 

 

Best Regards,
Community Support Team _ Eason

Greg_Deckler
Super User
Super User

What does your original source data look like? And what is the formula for All Hours? Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Anonymous is this what you are looking for if filter by responsible_id 100

 

image.png

 

if yes then here is the measure:

 

Emp Hours = 
VAR __empList = VALUES ( Emp[Empl_id] )
RETURN
CALCULATE ( 
    SUM ( Emp[All Hours] ), 
    ALL ( Emp[Responsible_id] ),  
    __empList 
)

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Awesome, that did made it much better, not exactly what I wanted as I needed a few more adjustments (issues I didn't notice until after I asked the question), but definitely on the right track! Thanks a lot.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.