Forum Discussion

busamed's avatar
busamed
New Member
3 years ago

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

 

 

VisualTable NameField Name
ResponsesEmergencyUnit SatisfactionId
Hospital SliderEmergencyUnit SatisfactionRelatedHospital
DischargesEmergencyUnit Satisfaction 

 



PatientMergedData (Table) have the following fields:

Id
Hospital

------
Current Problem:

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:


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:

 

 

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

  • 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.