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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
SarahHope
Helper II
Helper II

Tricky (for me) Slicer Situation

I am working on a dashboard showing survey response metrics. 

 

About my sources:

 

Table Surveys60.  I've imported a table that I created using SQL for all returned surveys which were sent out in the last 60 days.  The data is coming from a view in the database.  That view has lots of information that I would otherwise have to get by joining other tables, so it is ideal...except for that it only contains records for returned surveys.   This table is Surveys60.

 

Table SurveyRequested. To get the number of surveys sent out, I have created using SQL another table with only a few columns.  This other table contains all of the surveys sent, whether they were returned or not.  I chose all surveys sent out in the last 60 days.  So this table has more rows than Surveys60.  It is called SurveyRequested.

I have card visuals showing each metric.

SarahHope_0-1722794101175.png

The problem is that when I use a slicer - only the completed value changes.  The sent does not.

 

The Survey completed card is based on a count of the rows in Surveys60 table.

SurveysCompleted = COUNTROWS(Surveys60)

The surveys sent is based on a count of the rows in the SurveyRequested table.  

SurveySent = COUNTROWS(SurveyRequested)
 

The tables are joined on Survey_Requested(SR_ID) and Surveys60(ResponseID). 
I made sure that the values in each of these columns were in the same range - they wouldn't be identical because some were sent and not yet received.   But they are all in the same numerical range.  They are also of matching data type - whole number. 

SarahHope_1-1722794370094.png

 

My slicers are all using data from the Surveys60 table.  (by date range, by service, by institution, by source)  The Value of the Survey Sent is not changing based on any of my four slicers.  The completed is changing accordingly. 

Is there a simple way to fix this?  Please assume I'm somewhat new to Power BI.  

Do I need to provide more information?

Thank you!

Sarah

1 ACCEPTED SOLUTION
Dangar332
Super User
Super User

Hi, @SarahHope 

You are using Surveys60's Field in slicer, and Surveys60 is fact table so problem occur.

becuase fact table does not filter dimension table(SurveyRequested).


you have to change filter direction or use crossfilter function for change filter direction on fly.
use below meaure

 

SurveySent = 
calculate(
COUNTROWS(SurveyRequested),
CROSSFILTER(
'Surveys60'[ResponseID],
'SurveyRequested'[SR_ID],
Both
)

 


For more about crossfilter refer URL 

Best Regards,
Dangar

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Dangar332
Super User
Super User

Hi, @SarahHope 

You are using Surveys60's Field in slicer, and Surveys60 is fact table so problem occur.

becuase fact table does not filter dimension table(SurveyRequested).


you have to change filter direction or use crossfilter function for change filter direction on fly.
use below meaure

 

SurveySent = 
calculate(
COUNTROWS(SurveyRequested),
CROSSFILTER(
'Surveys60'[ResponseID],
'SurveyRequested'[SR_ID],
Both
)

 


For more about crossfilter refer URL 

Best Regards,
Dangar

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.