Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
You need to change your customer_id dimension to be the following:
=aggr(Only({<[CUSTOMER_ID]={"=((SUM(MO) >= $(vMinMO) and SUM(MO) <= $(vMaxMO)) or (SUM(RC) >= $(vMinRC) AND SUM(RC) <= $(vMaxRC)))"}>}[CUSTOMER_ID]),[CUSTOMER_ID])
Then set your MO and RC fields to simply be SUM(MO) and SUM(RC). This should solve the issue. Changes applied to your sample attached.
Sorry @Wayne_101 , it occurred to me late last night that that my solution was only going to work for one measure and you wanted it to work for more than one, I'm trying to do too many things at once! Looks like @andoryuu has it sorted for you now though. Good luck!
hi,
the above shared logic doesn't work .
slider doesn't filter the data in ranges as seen in below images.
lets say :
eg :i want to see my customer who have MO between 200 and 300 plus having RC between 1000 and 3000
This :
= If (MO>= $(vMinMous) AND MO<= $(vMaxMous)
or If RC>= $(vMinRC) AND RC<= $(vMaxRC),Customer_ID)
should be this (easily expanded) :
= If (
(MO>= $(vMinMous) AND MO<= $(vMaxMous)) AND
(RC>= $(vMinRC) AND RC<= $(vMaxRC)),
Customer_ID)
Also, you don't need the filter on your measures, only on the dimensions.
I posted an answer but it was reported as spam for some reason.
Your dimension's IF condition doesn't work, here's a working version of your file.
it works perfectly fine , just one last thing how can i make it work with count(distinct customer_id)
what you suggested for dimension
=if(
(MO >= $(vMinMO) and MO <= $(vMaxMO)) and
(RC >= $(vMinRC) AND RC <= $(vMaxRC))
,CUSTOMER_ID)
what you suggested for Measure
=if(Aggr(sum(RC)>= $(vMinRC), CUSTOMER_ID) and Aggr(sum(RC) <= $(vMaxRC),CUSTOMER_ID),sum(RC))
logic i want to use for dimension :
=if(
(MO >= $(vMinMO) and MO <= $(vMaxMO)) and
(RC >= $(vMinRC) AND RC <= $(vMaxRC))
,count(distinct CUSTOMER_ID))
It works based on your logic. You have them specified as or statements. everything you circled falls into EITHER the MO OR the RC band. If you want it to be the intersection, just change OR to AND.
@Saryk Filtering on measures was removed in my reply back.
My bad, I didn't check the measures in the file I sent you back.
You can actually change them to =sum(MO) and =sum(RC) because the filtering is already done in the dimension.