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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
busamed
New Member

Power Bi Dax Query - Count and Filter on Selected Slider

Hi All

 

I need help with Power BI Dax Query .... Below my visual and tables

 

busamed_0-1684406368762.png

 

VisualTable NameField Name
ResponsesEmergencyUnit SatisfactionId
Hospital SliderEmergencyUnit SatisfactionRelatedHospital
DischargesEmergencyUnit Satisfaction 

 



PatientMergedData (Table) have the following fields:

Id
Hospital

------
Current Problem:
busamed_0-1684406368762.png
Explain Function for each Visual

Responses, it the count of all the Id within EmergencyUnit Satisfaction and Filtered based on the Hospital (eg: Hillcrest Private Hospital)

 

Hospital Slider, its a slider with the list of RelatedHospital field within the EmergencyUnit Satisfaction Table 

 

Discharges, it a measure that calculate/count from another table called "PatientMergedData" and counting the Id field

The Discharges measure formula is below:
busamed_0-1684408018383.png

Expectation

 

To update the Measure to:

 

1) Filter the PatientMergedData (table) with field "Hospital" is equal to the selected Hospital Visual (which is from EmergencyUnit Satisfaction, RelatedHospital)

2) Count the PatientMergedData (table) with field "Id"

3) Display value to Measure

End results should be like:

 busamed_0-1684408303102.png

 

Responses is correct

Hospital is correct

Discharges, count of Id from PatientMergedData AND filtered Hospital field based on selected Hospital Slider


Need help with the Measure

1 REPLY 1
lbendlin
Super User
Super User

Filter the PatientMergedData (table) with field "Hospital" is equal to the selected Hospital Visual (which is from EmergencyUnit Satisfaction, RelatedHospital)

That should be a job for your data model.  Let your data model do the work for you.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.