Forum Discussion
Measure with Variables and Filters
By putting the column [Phase] in a matrix/table, you are adding the filters implicitly in the visualization and don't need them in the measure.
So your code should be
SCORE =
VAR score =
CALCULATE(
[mailing-opens] ;
[Art] IN {"Initial"}
)
RETURN
score(if you are putting [Art] in the visual as well, you can remove the measure altogether as you would just use [mailing-opens] as the value
Hope this helps
David
- raymond7 years agoPost Patron
dedelman_clng Thank you.
However, what if the following is the case :)
SCORE = VAR scoreA = CALCULATE( [mailing-opens] ; [Phase] IN {"Welcome-Phase"} ; [Art] IN {"Initial"} ) VAR scoreB CALCULATE( [mailing-klicks] ; [Phase] IN {"Welcome-Phase"} ; [Art] IN {"Result"} ) RETURN scoreA + scoreBWhat I hope to see in a matrix table is the Result of scoreA + scoreB for the "Welcome-Phase" and in a drill down to "Art" the separate values for "Result" and "Initial"
- dedelman_clng7 years agoCommunity Champion
Can you provide a sample of data and your expected results?
- raymond7 years agoPost Patron
Sure. I have uploaded a sample to dropbox. click here
It is a quite simple case. There E-Mailings and Phases. I want to calculate a score for E-Mail A and E-Mail B. The scores are different. Hence on the level of the Initial Phase the value is correct. In the drill down the values are not. Furthermore under Results the same value is shown. This should be 0.
For A and B and the score on the initial level the values should be as such: