Forum Discussion
Macccc
7 years agoFrequent Visitor
numeric dstribution/detention
Hello Forum, I am pretty new to Power BI and sometimes I even doubt if I should be using it... I have aproblem I need to solve: I need to find the % of brand presence in each store (Brand detentio...
v-chuncz-msft
7 years agoCommunity Support
You may add the following measure to a Matrix visual.
Measure =
VAR c =
HASONEFILTER ( Table1[Client] )
VAR b =
HASONEFILTER ( Table1[Brand] )
RETURN
SWITCH (
TRUE (),
AND ( c, b ), "P",
AND ( c, NOT ( b ) ), DIVIDE ( DISTINCTCOUNT ( Table1[Brand] ), COUNTROWS ( ALL ( Table1[Brand] ) ) ),
AND ( NOT ( c ), b ), DIVIDE (
DISTINCTCOUNT ( Table1[Client] ),
COUNTROWS ( ALL ( Table1[Client] ) )
)
)
Macccc
7 years agoFrequent Visitor
Thanks Sam for the fast reply;
I applied your formula but it doesn't work - I get 100% presence when it is not true.
What can be wrong? Is there a better way for me to explain the problem?
Thanks in advance
- v-chuncz-msft7 years agoCommunity Support
- Macccc7 years agoFrequent Visitor
Hi Sam,
I've just checked and I have the latest version of PBI desktop, and it doesn't work for me.
Is there a way you can help? anything I am not doing right?
Yhanks
Mac