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

Matrix component drill down function, percentages are automatically summed

WXWorkCapture_17254212238511.pngWXWorkCapture_17254212434550.pngHi Team,As shown in the figure above, the percentage is given by (No. of Applications -Exceeded 10 working days)/No. of Applications, but when we put the fold back, it becomes the sum of the 3 types, We want the result to still be calculated using the above expression, what should we do.Hope to hear from you soon. Thanks.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Gawain ,

I created some data:

vyangliumsft_0-1725506256536.png

You can use the following measure:

Measure =
(SUM('Table'[No.ofApplications])-SUM('Table'[Exceeded 10 working days])) / SUM('Table'[No.ofApplications])

vyangliumsft_1-1725506256539.png

If this abovemeasure doesn't get the tone effect, you can use a combination of the If() + ISINSCOPE() functions to calculate the corresponding values for each level:

Measure 2 =
var _totalnoofapplications=
SUMX(ALL('Table'),[No.ofApplications])
var _totalexceeded=
SUMX(ALL('Table'),[Exceeded 10 working days])
var _level1noofapplications=
SUMX(FILTER(ALL('Table'),'Table'[Year]=MAX('Table'[Year])),[No.ofApplications])
var _level1exceeded=
SUMX(FILTER(ALL('Table'),'Table'[Year]=MAX('Table'[Year])),[Exceeded 10 working days])
var _level2noofapplications=
SUMX(FILTER(ALL('Table'),'Table'[Year]=MAX('Table'[Year])&&'Table'[Month]=MAX('Table'[Month])),[No.ofApplications])
var _level2exceededs=
SUMX(FILTER(ALL('Table'),'Table'[Year]=MAX('Table'[Year])&&'Table'[Month]=MAX('Table'[Month])),[Exceeded 10 working days])
var _level3noofapplications=
SUMX(FILTER(ALL('Table'),'Table'[Year]=MAX('Table'[Year])&&'Table'[Month]=MAX('Table'[Month])&&'Table'[Group]=MAX('Table'[Group])),[No.ofApplications])
var _level3exceeded=
SUMX(FILTER(ALL('Table'),'Table'[Year]=MAX('Table'[Year])&&'Table'[Month]=MAX('Table'[Month])&&'Table'[Group]=MAX('Table'[Group])),[Exceeded 10 working days])
RETURN
IF(
    ISINSCOPE('Table'[Group]),DIVIDE(_level3noofapplications-_level3exceeded,_level3noofapplications),
    IF(
       ISINSCOPE('Table'[Month]),DIVIDE(_level2noofapplications-_level2exceededs,_level2noofapplications),
       IF(
        ISINSCOPE('Table'[Year]),DIVIDE(_level1noofapplications-_level1exceeded,_level1noofapplications),
        DIVIDE(_totalnoofapplications-_totalexceeded,_totalnoofapplications))))

vyangliumsft_2-1725506276724.png

 

Best Regards,

Liu Yang

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

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi  @Gawain ,

I created some data:

vyangliumsft_0-1725506256536.png

You can use the following measure:

Measure =
(SUM('Table'[No.ofApplications])-SUM('Table'[Exceeded 10 working days])) / SUM('Table'[No.ofApplications])

vyangliumsft_1-1725506256539.png

If this abovemeasure doesn't get the tone effect, you can use a combination of the If() + ISINSCOPE() functions to calculate the corresponding values for each level:

Measure 2 =
var _totalnoofapplications=
SUMX(ALL('Table'),[No.ofApplications])
var _totalexceeded=
SUMX(ALL('Table'),[Exceeded 10 working days])
var _level1noofapplications=
SUMX(FILTER(ALL('Table'),'Table'[Year]=MAX('Table'[Year])),[No.ofApplications])
var _level1exceeded=
SUMX(FILTER(ALL('Table'),'Table'[Year]=MAX('Table'[Year])),[Exceeded 10 working days])
var _level2noofapplications=
SUMX(FILTER(ALL('Table'),'Table'[Year]=MAX('Table'[Year])&&'Table'[Month]=MAX('Table'[Month])),[No.ofApplications])
var _level2exceededs=
SUMX(FILTER(ALL('Table'),'Table'[Year]=MAX('Table'[Year])&&'Table'[Month]=MAX('Table'[Month])),[Exceeded 10 working days])
var _level3noofapplications=
SUMX(FILTER(ALL('Table'),'Table'[Year]=MAX('Table'[Year])&&'Table'[Month]=MAX('Table'[Month])&&'Table'[Group]=MAX('Table'[Group])),[No.ofApplications])
var _level3exceeded=
SUMX(FILTER(ALL('Table'),'Table'[Year]=MAX('Table'[Year])&&'Table'[Month]=MAX('Table'[Month])&&'Table'[Group]=MAX('Table'[Group])),[Exceeded 10 working days])
RETURN
IF(
    ISINSCOPE('Table'[Group]),DIVIDE(_level3noofapplications-_level3exceeded,_level3noofapplications),
    IF(
       ISINSCOPE('Table'[Month]),DIVIDE(_level2noofapplications-_level2exceededs,_level2noofapplications),
       IF(
        ISINSCOPE('Table'[Year]),DIVIDE(_level1noofapplications-_level1exceeded,_level1noofapplications),
        DIVIDE(_totalnoofapplications-_totalexceeded,_totalnoofapplications))))

vyangliumsft_2-1725506276724.png

 

Best Regards,

Liu Yang

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

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.