Forum Discussion
Custom Aggregation in a Matrix by Using another query?
- 2 years ago
output
Measure = SWITCH( TRUE(), ISINSCOPE(DP_Level[discoveryprodcategory_id]),SUM(DP_Level[online_Customers]), ISINSCOPE(DC_Level[discoverydept_num]),SUM(DC_Level[online_Customers]) )just need to reverse the order of the levels .
when using isinscope, you should always start with the lowest level ,and go up .
hope this helps .
If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution ✅
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠
Thank you for the reply Daniel29195 , I tried the isinscope method and it worked for the high level D1, but not for the subgroups. I attached a sample file sample for any insight - I think it may be because i'm using another "sku" table to connect the primary keys? Should I rework my model first?
https://drive.google.com/file/d/15pCLA4aNKvYoY0eC1dCN8aQSEBUAh9gn/view?usp=sharing
output
Measure = SWITCH(
TRUE(),
ISINSCOPE(DP_Level[discoveryprodcategory_id]),SUM(DP_Level[online_Customers]),
ISINSCOPE(DC_Level[discoverydept_num]),SUM(DC_Level[online_Customers])
)
just need to reverse the order of the levels .
when using isinscope, you should always start with the lowest level ,and go up .
hope this helps .
If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution ✅
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠
- alaynanich2 years agoHelper I
Daniel29195 Thanks you so much!!! This will be so helpful in the future - excited to learn a new function