Forum Discussion
DAX If And Filter
I am trying to figure out how to do this. Basically I am trying to write a DAX equation that will allow me to create a measure with multiple filters.
I want to get the Tanks[Tank_Name] where Tanks[Day_Tank]=FALSE && Tanks[INDEX]=MIN(Tanks[INDEX]) following the Day Tank filter
i.e. if Day_Tank=FALSE, Lookup Tank_Name where Index is smallest value.
The reason for this is because I am going to have visuals on the same dashboard where Day_Tank = True and Day_Tank = FALSE
I've been playing around with this for a few days now without success.
Finally figured out what I wanted. I'm not sure why I was having such an issue.
Day_Tank_1 = CALCULATE(VALUES(Tanks[Tank_Name]),FILTER(Tanks,Tanks[Day_Tank]=TRUE()),FILTER(Tanks,Tanks[INDEX]=1))
9 Replies
- parry2kSuper User
tkrupka if you share sample data with expected result it will help to provide the solution. Read this post to get your answer quickly.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490