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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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