Forum Discussion
Common item based on the dynamics selection
- 4 years ago
crystalLearn solution sent you by an email, here is the core measure:
Common Items = VAR __itemsWithDistinctSupplier = SUMMARIZE ( ALLSELECTED ( Sheet1 ), Sheet1[item], "@C", DISTINCTCOUNT ( Sheet1[supplier] ) ) VAR __selectedSupplier = CALCULATE ( DISTINCTCOUNT ( Sheet1[supplier] ), ALLSELECTED ( ) ) VAR __itemsFilter = FILTER ( __itemsWithDistinctSupplier, [@C] = __selectedSupplier ) RETURN CALCULATE ( COUNTROWS ( Sheet1 ), KEEPFILTERS ( __itemsFilter ) )✨ Follow us on LinkedIn and to our YouTube channel
Learn about conditional formatting at Microsoft Reactor
My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.
crystalLearn solution sent you by an email, here is the core measure:
Common Items =
VAR __itemsWithDistinctSupplier =
SUMMARIZE (
ALLSELECTED ( Sheet1 ),
Sheet1[item],
"@C", DISTINCTCOUNT ( Sheet1[supplier] )
)
VAR __selectedSupplier =
CALCULATE (
DISTINCTCOUNT ( Sheet1[supplier] ),
ALLSELECTED ( )
)
VAR __itemsFilter = FILTER ( __itemsWithDistinctSupplier, [@C] = __selectedSupplier )
RETURN
CALCULATE (
COUNTROWS ( Sheet1 ),
KEEPFILTERS ( __itemsFilter )
)
✨ Follow us on LinkedIn and to our YouTube channel
Learn about conditional formatting at Microsoft Reactor
My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.
you are a genius!!! parry2k thank you!!! You saved my day!!! HERO 😄