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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
SamVH12
Helper I
Helper I

Measures on the hierarchy display incorrectly

Hi guys,

I have a fact table for total gross sales and a Hierarchy table, "Hier1", with diferrent levels

The Hier1 table looks like this: 

Hier1Hier2Hier3Hier4IDLEVEL
L1L1-GGL1-GG/AL1-GG/A120344
L1L1-GGL1-GG/AL1-GG/A220404
L1L1-GGL1-GG/B 20423

The total gross sales table uses Direct Query, and the Hier1 table uses Dual mode

These two tables map based on Hierarchy ID.

I created a Matrix as follows:

SamVH12_3-1742219959109.png

And I have a couple of questions:

1. I'm not sure why, when I create TGS%, it does not show the result for the child at level 4, even though the each formula inside includes a value

The formula is:

TGS% = IF(

    NOT(ISBLANK([TGS CY]))
    &&
    NOT(ISBLANK([TGS CY Ex]))
        ,(([TGS CY]/[TGS CY Ex]))/100
        ,BLANK())
2. Since the hierarchy does not have consistent levels (some have 4 levels, while others have 3), I do not want to show the rows with blank names at level 4, which I marked in blue.

SamVH12_4-1742220172038.png

To solve this, i created 2 measure, MaxLevel and LevelDisplay and added them to the Hier1_CY measure, which will replace the "TGS CY" (the TGS CY Ex will also use the same new measure as Hier1_CY) to hide blank hierarchy levels.

** MaxLevel = MAX(Hier1[level])

**LevelDisplay = ISINSCOPE( Hier1[Hier1] )

    + ISINSCOPE ( Hier1[Hier2] )
    + ISINSCOPE(Hier1[Hier3])
    + ISINSCOPE(Hier1[Hier4])
**Hier1_CY =
VAR Val = [TGS CY]
VAR Check =
    [LevelDisplay] <= [MaxLevel]
VAR Result =
    IF ( Check, Val )
RETURN
    Result
 However, the result does not show what I expected, it's only show data of level1,2,3:
SamVH12_6-1742222205224.png

 When i checked each measure, the the measure in Hier4 split into 2 rows with the same name. As a result, "Hier1_CY" does not show what i want

 SamVH12_5-1742220808558.png
I tested the same measures in Import mode, and it worked well. However, since I need to use Direct Query and Dual mode, I am wondering if the issue is due to limitations of Direct Query mode.
Can anyone help? I would greatly appreciate it!
2 REPLIES 2
Anonymous
Not applicable

Hi @SamVH12 ,

ISINSCOPE does have some limitations in Direct Query mode. Please check if you are using it in a calculated column or if there is RLS in your report.

vjunyantmsft_0-1742434316689.png
https://learn.microsoft.com/en-us/dax/isinscope-function-dax#remarks 

 

In addition, the information you provided is too little, the sample data is incomplete, and I cannot tell how many tables you used and the relationship between the tables. Please provide more detailed sample data and the expected results based on the sample data, thank you!

Best Regards,
Dino Tao

Hi @Anonymous ,

thank you for your reply,

I only have two tables. The first is the Hierarchy table, as I mentioned in the first post.

The second is the TGS table, which has 3 columns: Hierarchy ID, TGS CY, TGS CY Ex

Both tables are mapped based on the Hierarchy ID.

The question 1, regarding the TGS % column in the Matrix, it should calculate for the hierarchy levels L1-GG/A1, LL1-GG/A2, L1-GG/B as the formula i wrote, but it show blank in the image below.

SamVH12_1-1742478910277.png

 

The question 2, i created ISINSCOPE as a measure. I believe it is different from a calculated column, am I right? Additionally, I don’t have any RLS in my report.

 

Basically, i switched to the import mode now, and it doesnt have any issues, I just want to understand why this issue might happen.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors