Forum Discussion
Numeric range dropdown filter
return
I do have a measure in the matrix Values section, i dont know if that creates a problem.
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:
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.
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
Hi ValtteriN
Below you can see the calculated columns and measures that i use as cards and matrixes. The graph works perfectly with the parameter but the matrix doesnt show any data and the card and can't set the Rooms Filter to = 1.
Graph(works)
The graph works fine. I have a date column as axis, a calculated column as Legend and a measure in Values:
-Legend:Calculated Column=if(Table1[columnX] = "Legend1", "Legend2",if(Table1[columnX] <> "Legend1" || Table1[columnX] = "Legend1","All"))
-Values:Measure =CALCULATE(AVERAGE(Table1[columnY]),Table1[columnZ] = "B")I also have a date filter on the filters pane saying only look at data from today and 3 months back.Card(doesnt work)Measure =CALCULATE(COUNT(Table1[ColumnY]),Table1[ColumnZ] = "B")I also have a date filter on the filters pane saying only look at data from today and 3 months back.Matrix(doesnt work)-Rows
Calculated Column =
if(Table1[ColumnX] = "example text", "output",
if(Table1[ColumnX] <> "example text"|| Table1[ColumnX] = "example text", "output2"))-Columns
Calculated Column =
if(Table1[Datesegment] = "1", " X",
if(Table1[Datesegment] = "2", " Y",
if(Table1[Datesegment] = "3", " Z",
if(Table1[Datesegment] = "4", "F"))))
-Values
Measure =
CALCULATE(AVERAGE(Table1[price]),Table1[category] = "V") - ValtteriN4 years agoCommunity Champion
arvin
Card:
Normally you can't filter card with a measure. To circumvent this we can first create a table visual and place the filter there:
Now convert it to a card:
As for the matrix:
Instead of nested IFs you should use
SWITCH(TRUE(),
condition1,result1,
condition2,resul2) structure.
This doesn't solve the issue but it is more readable.
My assumption is that your columns work and the issue is with the measure. You can you test this b testing the visual with this:
TestMeasure =
CALCULATE(AVERAGE(Table1[price]),Table1[category] = "V",ALL(Table1))
If this return values this should work:
Working Measure =
var cc1 = Max(Calculated Column)
var cc2 = Max(Calculated Column2) return
CALCULATE(AVERAGE(Table1[price]),Table1[category] = "V",ALL(Table1),
Table1[Calculated Column]=cc1,Table1[Calculated Column]=cc2) - arvin4 years agoRegular Visitor
Hi ValtteriN
I tried the card trick and it did not work when choosing a parameter, the value is the same every time.I also tried the test measure for the matrix, but all values in the matrix became identical and when choosing parameters they all disappeared, picture below:
TestMeasure =
CALCULATE(AVERAGE(Table1[price]),Table1[category] = "V",ALL(Table1))