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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Matrix with its own value when I expand to the next level

Hello,

 

I want to ask how do I calculate Stores below. I want it has its own value when I expand to the next level (the manager name)

ChristoNindyo_1-1706752419069.png

This is the measure I used :

AM_STORE_COUNT3 =
CALCULATE(
DISTINCTCOUNT(CUST_UNI[LEGAL_NAME]),
CUST_UNI[BANNER_NAME] = SELECTEDVALUE(IRI_STORE_COMBINED[BANNER_NAME]
))

 

Notes: LEGAL_NAME is the store name

 

Thank you !

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous ,  Your formula seem fine to me, you can use removefilters

AM_STORE_COUNT3 =
CALCULATE(
DISTINCTCOUNT(CUST_UNI[LEGAL_NAME]),
removefilters(CUST_UNI[BANNER_NAME])
))


or


AM_STORE_COUNT3 =
CALCULATE(
DISTINCTCOUNT(CUST_UNI[LEGAL_NAME]),
filter(allselected(CUST_UNI) , CUST_UNI[BANNER_NAME] = max(CUST_UNI[BANNER_NAME])
))

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

Ritaf1983
Super User
Super User

Hi @Anonymous 
It seems that you are using disconnected tables...
if the tables are with relationships the measure  should be just :
DISTINCTCOUNT(CUST_UNI[LEGAL_NAME])


if not you can try something like :
if (CUST_UNI[BANNER_NAME] = max(IRI_STORE_COMBINED[BANNER_NAME],

DISTINCTCOUNT(CUST_UNI[LEGAL_NAME]),"")

for more detailed and accurate suggestion 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

2 REPLIES 2
Ritaf1983
Super User
Super User

Hi @Anonymous 
It seems that you are using disconnected tables...
if the tables are with relationships the measure  should be just :
DISTINCTCOUNT(CUST_UNI[LEGAL_NAME])


if not you can try something like :
if (CUST_UNI[BANNER_NAME] = max(IRI_STORE_COMBINED[BANNER_NAME],

DISTINCTCOUNT(CUST_UNI[LEGAL_NAME]),"")

for more detailed and accurate suggestion 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
amitchandak
Super User
Super User

@Anonymous ,  Your formula seem fine to me, you can use removefilters

AM_STORE_COUNT3 =
CALCULATE(
DISTINCTCOUNT(CUST_UNI[LEGAL_NAME]),
removefilters(CUST_UNI[BANNER_NAME])
))


or


AM_STORE_COUNT3 =
CALCULATE(
DISTINCTCOUNT(CUST_UNI[LEGAL_NAME]),
filter(allselected(CUST_UNI) , CUST_UNI[BANNER_NAME] = max(CUST_UNI[BANNER_NAME])
))

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors