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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Helper I
Helper I

Allselected not considering the date filter context

I use below dax code to calculate % of client survyes to the total survey count received. 

% Contribution of clients =
'Raw data'[clientname]),[Client_count_All])
Client_count_All is a measure =  
COUNT('Raw data'[clientname]),ALLSELECTED('Raw data')
When a table matrix visual , i put the client name and total surveys then % Contribution of clients and 1 date slicer it gives the correct figures. the moment i add month year as column in the table matrix it is not giving the correct figures. i think it is adds up the total for jul'22 and aug'22 and then it takes this amount as total count 
I want this measure to accept all context from slicers or and on table matrix ( in table matrix row will be always client name and column will be either month, or quarter from the date dim table). please provide some guidance on how to fix this. 
 this is correct 
date slicer      
01-07-202231-Jan-23 clienttotal surveystotal count% contribution
   total2000 100%


this is not correct

date slicer  total surveys% contribution    
01-07-202231-Jan-23clientJul-22total count%Jul-22total count%
  total 1200    
Super User
Super User

@prady2581 , In that case you should use remove filters of client


Client_count_All =
COUNT('Raw data'[clientname]),removefilters('Raw data'[client] )


Learn Power BI: All, allselected, removefilters,allexcept-

Helpful resources

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors