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
Adaz
Frequent Visitor

Summarize Compliance of Shopping Malls by Row Level Using Measure

Hello,

 I am trying to summarise the performance of kiosks within shopping malls using a measure. If a Kiosk Type is existing plus clean then this is considered a compliant Kiosk Type within a mall.

 

For example Kiosk Type A in Sunnyside Shopping Mall is compliant as it exists and clean.

However Kiosk Type B within the same Sunnyside Shopping mall is not compliant as the second Kiosk Type B (Kiosk TypeB2) is not clean.

 

My data looks like the following.

 

Mall Unique CodeShop NameKiosk TypeKiosk Type Unique CodeQuestionAnswer
1Bayswater Shopping MallKIOSK Type AKiosk Type ADoes this exist?No
1Bayswater Shopping MallKIOSK Type AKiosk Type AIs this clean?No
1Bayswater Shopping MallKIOSK Type BKIOSK Type BDoes this exist?Yes
1Bayswater Shopping MallKIOSK Type BKIOSK Type BIs this clean?Yes
1Bayswater Shopping MallKIOSK Type BKIOSK Type B2Does this exist?Yes
1Bayswater Shopping MallKIOSK Type BKIOSK Type B2Is this clean?Yes
2Sunnyside Shopping MallKIOSK Type AKiosk Type ADoes this exist?Yes
2Sunnyside Shopping MallKIOSK Type AKiosk Type AIs this clean?Yes
2Sunnyside Shopping MallKIOSK Type BKIOSK Type BDoes this exist?Yes
2Sunnyside Shopping MallKIOSK Type BKIOSK Type BIs this clean?Yes
2Sunnyside Shopping MallKIOSK Type BKIOSK Type B2Does this exist?Yes
2Sunnyside Shopping MallKIOSK Type BKIOSK Type B2Is this clean?No

 

The output I desire is below in this summary table.

 

Kiosk TypeNumber of Compliant Malls
KIOSK Type A1
KIOSK Type B1

 

Kiosk Type A is compliant in Sunnyside Shopping Mall.  (clean and existing)

Kiosk Type B is compliant in Bayswater Shopping Mall as both Kiosk Type Bs are compliant. (clean and existing)

 

My attempt

Measure 1

Kiosk Count

=
CALCULATE (
    COUNTROWS ( Table1 ),
    Table1[Question] = "Does this exist?",
    Table1[Answer ] = "Yes",
    ALLEXCEPT ( Table1, Table1[Mall Unique Code], Table1[Kiosk Type] )
)

 

Measure 2

Clean Count=
CALCULATE (
    COUNTROWS ( Table1 ),
    Table1[Question] = "Is this clean?",
    Table1[Answer ] = "Yes",
    ALLEXCEPT ( Table1, Table1[Mall Unique Code], Table1[Kiosk Type] )
)

 

Measure 3

DIVIDE([Kiosk Count],[Clean Count])
 
---------

If I pivot the Kiosk type and the second heirachy is by mall and I count the 1s (which represent 100%). I get the result I desire (just not in the above summary table)

I am trying to avoid using calculated columns and was wondering if it is possible to roll up the compliance using measures only in the summary table?


Any help would be appreciated.

Thank you all!

1 ACCEPTED SOLUTION
Adaz
Frequent Visitor

I think I figured this one out.

The following measure provides the result I am after

 

Number of Compliant Malls:=CALCULATE(DISTINCTCOUNT('Table1'[Mall Unique Code]),FILTER('Table1',[Measure 3]>=1))

 

If anyone has a different way of calculating this, I would be interested in hearing this.

Thank you all.

 

View solution in original post

2 REPLIES 2
Adaz
Frequent Visitor

Any help would be appreciated
Adaz
Frequent Visitor

I think I figured this one out.

The following measure provides the result I am after

 

Number of Compliant Malls:=CALCULATE(DISTINCTCOUNT('Table1'[Mall Unique Code]),FILTER('Table1',[Measure 3]>=1))

 

If anyone has a different way of calculating this, I would be interested in hearing this.

Thank you all.

 

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
Top Kudoed Authors