Forum Discussion
kkjj
4 years agoFrequent Visitor
Not hard code with filter formula in Dax
Hi All I would like to not hard code this filter function. I basically want it to filter over Hotel Details[Hotel] and match with Activity 2013 [Business unit] so I do not have to go through and ...
amitchandak
4 years agoSuper User
kkjj , Not very clear, But if you use a slicer on hotel of hotel details, it should work based on selection, no need for filter code
kkjj
4 years agoFrequent Visitor
Hi
Thanks for your reply.
How do I use the slicer?
I have the following tables
Activity 2013
Hotel Details
I want to be able to make a graph where I can see what each hotel's emissions are per m2 ie 'Activity 2013' [EmissionsBU] / 'Hotel Details' [Area].
How do I use the slicer to be able to see all the hotels in one graph? My code above is working because I hardcoded the location "Airport". But I want to get all the locations not jsut airport. When I try to make it loop through the locations so they "match" then the code stops working.
Ie when it looks like this:
Emissions/m2 = SUMX(
FILTER(
'Hotel Details',
FILTER('Activity 2013',
'Hotel Details'[Hotel]='Activity 2013'[Business unit]
),
'Activity 2013'[EmissionsBU]/ 'Hotel Details'[Area]
)
Hope that makese sense.
Thanks