Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Measure with slicer and filter both

My sample data looks like folllowing (original data has many rows): 

ManagerCountryAssets
aUK20
bUS30
cUK10
dUK40
eUS50

 

I have a slicer for country on my page. Added a bar chart showing assets of each manager, with a visual level filter of top 2 managers by assets. 

 

I am trying to create a measure for the market share using 'divide' where numerator changes as per the slicer and accounts the filter both while denominator stays to the total (in this case 150) 

 

I have used the below formula but this is not accounting the top-2 filter: 

share =
DIVIDE (
SUM ( Table3[Assets] ),
CALCULATE (SUM(Table3[Assets]),ALL(Table3[Country]),ALL(Table3[Manager])
))*100
1 REPLY 1
vanessafvg
Super User
Super User

@Anonymous  please show me what you expecting to see, and what you are currently getting,  its hard to visualise what you saying.  its always best to show what you getting and what you want to get with visuals.

 

it might just be a case of changing this to to allselected rather than all

 

Measure =
DIVIDE (
    SUM ( Table3[Assets] ),
    CALCULATE (
        SUM ( Table3[Assets] ),
        ALLSELECTED ( Table3[Country] ),
        ALLSELECTED ( Table3[Manager] )
    ) * 100
)




If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.