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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Sania-F
Contributor

use ISINSCOPE for increased readability in Matrix visual

below measures are used to calculate the sales percentage at an hierarchical level.

measure 1: 
Sales % Group_reg_county =
 DIVIDE(
     SUM(Sales[Sales]),
     CALCULATE(
         SUM(Sales[Sales]),
         REMOVEFILTERS(
             Region[Region],
             Region[Country]
         )
     )
 )
 
 measure 2:
 
Sales % Group_r_c =
 IF(
     ISINSCOPE(Region[Region])
         || ISINSCOPE(Region[Country]),
     DIVIDE(
         SUM(Sales[Sales]),
         CALCULATE(
             SUM(Sales[Sales]),
             REMOVEFILTERS(
                 Region[Region],
                 Region[Country]
             )
         )
     )
 )

Both measures give same results, just the readability is better with ISINSCOPE.
SaniaF_0-1758712148578.png

 



3 REPLIES 3
FBergamaschi
Contributor III

This is a blog for asking for support

v-karpurapud
Honored Contributor II

Hi @Sania-F 

We really appreciate you taking the time to post this! Your explanation of the two approaches is clear and will definitely help others who run into similar use cases. But just for clarity, this space is primarily focused on answering specific questions, while detailed write-ups like yours are best shared on the Fabric Community Blog, where theyโ€™ll get even more visibility and engagement.

 

Regards,
Microsoft Fabric Community Support Team.

Thankyou for your suggestion ๐Ÿ™‚

Helpful resources

Announcements
Top Solution Authors
Users online (2,084)