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
Resolver I
Resolver I

FILTER CONTEXT - ISINSCOPE- used for hierarchy level filter test/checks

observe the resulty with each dax

dax - 

Revenue % total country =
var currentRegionRevenue =[Revenue]
var totalCountryRevenue = CALCULATE([Revenue],REMOVEFILTERS('Sales Territory'[Region]))
RETURN totalCountryRevenue  /*think its calculating and returning denominator by removing filter on region */

SaniaF_0-1758620650653.png

Added divide function to see %

Revenue % total country =
var currentRegionRevenue =[Revenue]
var totalCountryRevenue = CALCULATE([Revenue],REMOVEFILTERS('Sales Territory'[Region]))
RETURN
DIVIDE(currentRegionRevenue, totalCountryRevenue)

SaniaF_1-1758620822158.png

Now see the data with ISINSCOPE filter (our region is in hierarchy level) sop using isinscope

SaniaF_2-1758621065006.png

DAX- 

Revenue % total country =
var currentRegionRevenue =[Revenue]
var totalCountryRevenue = CALCULATE([Revenue],REMOVEFILTERS('Sales Territory'[Region]))
RETURN
if (ISINSCOPE('Sales Territory'[Region]),
DIVIDE(currentRegionRevenue, totalCountryRevenue)
)
also formatted the measure to percentage.
4 REPLIES 4
tayloramy
Community Champion
Community Champion

Hi @Sania-F

 

Can you please provide sample data and what the expected output from the sample data is? 


See these posts: 
https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Get-Your-Question-Answered-Qu...

How to provide sample data in the Power BI Forum - Microsoft Fabric Community

 

If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.

 

v-pgoloju
Community Support
Community Support

Hi @Sania-F,

Thank you for reaching out to the Microsoft Fabric Forum Community, and special thanks to @tayloramy   for prompt and helpful response.

 

Just following up to see if the Response provided by community member were helpful in addressing the issue.

If one of the response helped resolve your query, please consider marking it as the Accepted Solution. Feel free to reach out if you need any further clarification or assistance.

 

Best regards,
Prasanna Kumar

v-pgoloju
Community Support
Community Support

Hi @Sania-F,

 

Just following up to see if the Response provided was helpful in resolving your issue. Please feel free to let us know if you need any further assistance.

 

Best regards,

Prasanna Kumar

v-pgoloju
Community Support
Community Support

Hi @Sania-F,

 

Just following up to see if the Response provided by community member were helpful in addressing the issue.

If one of the response helped resolve your query, please consider marking it as the Accepted Solution. Feel free to reach out if you need any further clarification or assistance.

 

Best regards,
Prasanna Kumar

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric 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.

Users online (26)