Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I have a master measure calculated like this:
DELTA = (p2*q)-(p1*q)
then I would like to have a KPI with a master measure like this:
#positive rows = count(distinct {<DELTA={">0"}>} ID) but this doesn't work.
How can I do that?
Remove the text "#positive rows =" from your expression. If you need, you can add #positive rows in the label
yes, the "#positive rows =" is not in my master measures, I wrote this only to explain my problem better...
master measures number 1: DELTA
(p2*q)-(p1*q)
Master measure number2: #positive rows
count(distinct {<DELTA={">0"}>} ID)
Set modifiers can only be used on a field, so you will not be able to use it on a measure in this manner. You can however spell it out using an If() statement, e.g. Count(distinct if((p2*q)-(p1*q) > 0, ID)). Note that you may need to use aggr() if you want this calculated on anything but a per-single-row level.
You could also reframe this as a search on a field (ID in your case), but as I was editing to get the syntax right Kushal_Chadwa posted the correct one, so go with that one.