Forum Discussion
Numeric range dropdown filter
Sorry i sent the wrong printscreen. Here is the correct one. I have the measure = 1 and nothing shows.
Hmm,
That is curious behaviour. Could you show the DAX you used?
- arvin4 years agoRegular VisitorI created two parameters; Från(from) and Till(to)The measure is below:-Blad1[antal rum] is the column with rooms in my dataset.RoomsFilter =var _rooms = max(Blad1[antal rum])
returnIF(and(_rooms<=[Till Value],_rooms>=[Från Value]) ,1,0)
I do have a measure in the matrix Values section, i dont know if that creates a problem.- ValtteriN4 years ago
Community Champion
The filter measure seems to be correct. It is entirely possible that your other measure in matrix values causes the issue. Here is an example of that:
Impossible measure = CALCULATE(SUM(RoomsToFrom[Rooms]),RoomsToFrom[Rooms]=1)To solve this you can remove the filter context from this measure, since I don't know what your measure does I can only suggest using ALL.
E.g.Impossible measure2 = CALCULATE(SUM(RoomsToFrom[Rooms]),RoomsToFrom[Rooms]=1,ALL(RoomsToFrom))
There are better ways to do this, but I would need to know what your other measure does.- arvin4 years agoRegular Visitor
This is a example of the card measure:
Card Measure =CALCULATE(COUNT(Blad1[kontraktspris]),Blad1[bostads-kategori] = "B")This is the measure that I use in the matrix:Matrix measure =CALCULATE(AVERAGE(Blad1[kontraktspris]),Blad1[bostads-kategori] = "V")
- arvin4 years agoRegular Visitor
It works on tables and graphs, but when i have no option selected in the parameters the data disapears, can i create the measure so that when nothing is selected, all data is showing?
It does not work on matrixes and cards, in the picture below i can't select the Rooms Filter = 1.- ValtteriN4 years ago
Community Champion
Here is modified filter which works also when nothing is selected:
RoomsFilter =var _rooms = max(RoomsToFrom[Rooms])var _roomsfrom = IF([RoomsFrom Value]=BLANK(),0,[RoomsFrom Value])var _roomsto = IF([RoomsTo Value]=BLANK(),999,[RoomsTo Value])returnIF(and(_rooms<=_roomsto,_rooms>=_roomsfrom) ,1,0)