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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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.
1 ACCEPTED SOLUTION
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.

 

View solution in original post

3 REPLIES 3
v-pgoloju
Community Support
Community Support

Hi @Sania-F,

 

 we kindly request you to share the sample data as suggested by @tayloramy  in a workable format such as text, an Excel file, or a PBIX file with sample data instead of screenshots. Additionally, please include the expected output. This will enable us to assist you more effectively.


Regards,
Prasanna Kumar

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.

 

If the issue still persists, we kindly request you to share the sample data as suggested by @tayloramy  in a workable format such as text, an Excel file, or a PBIX file with sample data instead of screenshots. Additionally, please include the expected output. This will enable us to assist you more effectively.


Regards,
Prasanna Kumar


Prasanna Kumar

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.

 

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.