Forum Discussion
okusai3000
5 years agoHelper IV
Filter a Measure with another Measure
Hello everyone, I've spent the last 2 hours trying to find an answer but I couldn't find it. The request is simple: I need to count only those Items with "Antiguedad" less than 180. I tri...
- 5 years agoWhat does your raw data look like and where are you trying to use this filter/measure?
If you look at your Fact table, is there more than one row per Marca? Your measure will first calculate the Antiguedad for each row in your Fact Equipos table, and if the Antiguedad <-180 for that specific row, then the ID will be counted (though I'm not sure which table that ID is in? Your measure seems to have some syntax errors). If Antiguedad is a grouped measure by Marca, then you may need to put your FILTER(VALUES(Marca), [Antiguedad]<-180) and see if that gives the result you expect.
If not, please provide more info about your input data and show the current result you have achieved so far.
AllisonKennedy
5 years agoCommunity Champion
What does your raw data look like and where are you trying to use this filter/measure?
If you look at your Fact table, is there more than one row per Marca? Your measure will first calculate the Antiguedad for each row in your Fact Equipos table, and if the Antiguedad <-180 for that specific row, then the ID will be counted (though I'm not sure which table that ID is in? Your measure seems to have some syntax errors). If Antiguedad is a grouped measure by Marca, then you may need to put your FILTER(VALUES(Marca), [Antiguedad]<-180) and see if that gives the result you expect.
If not, please provide more info about your input data and show the current result you have achieved so far.
If you look at your Fact table, is there more than one row per Marca? Your measure will first calculate the Antiguedad for each row in your Fact Equipos table, and if the Antiguedad <-180 for that specific row, then the ID will be counted (though I'm not sure which table that ID is in? Your measure seems to have some syntax errors). If Antiguedad is a grouped measure by Marca, then you may need to put your FILTER(VALUES(Marca), [Antiguedad]<-180) and see if that gives the result you expect.
If not, please provide more info about your input data and show the current result you have achieved so far.
okusai3000
5 years agoHelper IV
Awesome Allison! Your solution was super accurate and it worked. Thank you!!