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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
andybamber
Helper III
Helper III

DAX Measure - Keepfilters

Hello!

 

I have a report for company headcount. The organisation has 5 levels going from Domain at the top to cost centre at level 5. The report has an organisational slicer which thge user can then use to see the headcount at any of these levels.

 

We now have headcount budgets, but these are only set at the Domain level. I have a KPI visual and what I need to do is restrict Indicator (current headcount) to allways only show the Domain level headcount even if the user selects a level below. I wrote this measure thinking keepfilters would ensure this.

 

 Headcount_KPI = CALCULATE(DISTINCTCOUNT(SNAP_DWH_RES_RESOURCE[resource_key]),LASTDATE(SNAP_DWH_RES_RESOURCE[snaphot_stamp]),
KEEPFILTERS(DWH_ODF_Z_CC_OWNERS_LN[cc_domain] = "A" ||
DWH_ODF_Z_CC_OWNERS_LN[cc_domain] = "B" ||
DWH_ODF_Z_CC_OWNERS_LN[cc_domain] = "C" ||
DWH_ODF_Z_CC_OWNERS_LN[cc_domain] = "D" ||
DWH_ODF_Z_CC_OWNERS_LN[cc_domain] = "E" ||
DWH_ODF_Z_CC_OWNERS_LN[cc_domain] = "F" ||
DWH_ODF_Z_CC_OWNERS_LN[cc_domain] = "G" ||
DWH_ODF_Z_CC_OWNERS_LN[cc_domain] = "H" ||
DWH_ODF_Z_CC_OWNERS_LN[cc_domain] = "I" ||
DWH_ODF_Z_CC_OWNERS_LN[cc_domain] = "J"
))

 

But when a user selects a lower level this seems to be ignored at the headcount for the new level is displayed... Can anyone advise where I am going wrong?

 

Thanks

Andy

1 ACCEPTED SOLUTION
AnkitKukreja
Super User
Super User

Hi @andybamber 

 

Use remove filters instead, what all does is ignore filters from that table and you can choose particular column instead of table as well. 

 

Please refer to below link.

https://www.youtube.com/watch?v=9qKe66uBce8

 

Thanks,

Ankit

If my response has successfully addressed your question or concern, I kindly request that you mark this post as resolved. Additionally, if you found my assistance helpful, a thumbs-up would be greatly appreciated.
Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904

View solution in original post

2 REPLIES 2
AnkitKukreja
Super User
Super User

Hi @andybamber 

 

Use remove filters instead, what all does is ignore filters from that table and you can choose particular column instead of table as well. 

 

Please refer to below link.

https://www.youtube.com/watch?v=9qKe66uBce8

 

Thanks,

Ankit

If my response has successfully addressed your question or concern, I kindly request that you mark this post as resolved. Additionally, if you found my assistance helpful, a thumbs-up would be greatly appreciated.
Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904

perfect, thanks Ankit!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors