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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
BaltoLo
Helper I
Helper I

Problem with IsFilterd, IsCrossFilterd and InScope

Hallo I have a problem with the use of IsFilterd, IsCrossFilterd and Inscope.

I use the following Measure for my drill-down:

 

 

DDPctBlaBlank = 
Var BLA = 0+count(FKT_STUWOCBLA[BLATTID])/(count(DIM_BLAETTER[BLATTID])*count(DIM_STUDENTEN[STUDENTID]))
VAR AUF = 0+count(FKT_STUWOCAUF[AUFGABEID])/(count(DIM_AUFGABEN[AUFGABEID])*count(DIM_STUDENTEN[STUDENTID]))
RETURN
IF(ISCROSSFILTERED(DIM_Aufgaben[Aufgabentitel]),Auf,Bla)

 

 

The IsCrossFiltered par is switched in the other cases with IsFiltered or InScope.
The measure calculates the percentage of non Blank entries.

 

When I am at the top level IsFiltered and InScope always return the correct value (The one of the var Auf). Iscrossfiltered already return the value of the var Bla.

If I drill-down and select nothing only IsCrossFiltered retruns the correct variable (Bla).
If I select something IsFiltered also starts to return the right value. InScope is still wrong.

BaltoLo_0-1610316965901.png

The picture show if the funciton retruns true or false for me and what percentage is retruned.
Is there another function I could use to fix this problem? On which would on the top-level always return Auf and on the bottom-level always Bla no matter what is selected?
 
Thanks in advance
1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @BaltoLo ,

According to my understanding, for ISCROSSFILTERED, only when the column is passed through the filter will it return True, not due to there is only one direct filter condition for this column. For ISFILTERED, when the parameter column is directly filtered, it will return True. And ISINSCROPE is similar to ISFILTERED, but it needs to determine whether the current row is in the hierarchy level, and only when two conditions are met at the same time, it returns True.


Based on the above differences between the three functions, you can check which side of the value has an error. If it is still not resolved, please provide a sample pbix file and mark the wrong place so that I can test it for you and solve your problem.


Looking forward to your reply.


Here is the difference between the three functions, you can use it as a reference.

PPP: ISCROSSFILTERED vs ISFILTERED Functions < Article < Blog | SumProduct are experts in Excel Trai...

ISINSCOPE function (DAX) - DAX | Microsoft Docs


Best Regards,
Henry

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

3 REPLIES 3
v-henryk-mstf
Community Support
Community Support

Hi @BaltoLo ,

According to my understanding, for ISCROSSFILTERED, only when the column is passed through the filter will it return True, not due to there is only one direct filter condition for this column. For ISFILTERED, when the parameter column is directly filtered, it will return True. And ISINSCROPE is similar to ISFILTERED, but it needs to determine whether the current row is in the hierarchy level, and only when two conditions are met at the same time, it returns True.


Based on the above differences between the three functions, you can check which side of the value has an error. If it is still not resolved, please provide a sample pbix file and mark the wrong place so that I can test it for you and solve your problem.


Looking forward to your reply.


Here is the difference between the three functions, you can use it as a reference.

PPP: ISCROSSFILTERED vs ISFILTERED Functions < Article < Blog | SumProduct are experts in Excel Trai...

ISINSCOPE function (DAX) - DAX | Microsoft Docs


Best Regards,
Henry

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

amitchandak
Super User
Super User

@BaltoLo , Not very clear on your issue. But IsCrossFiltered should work with any filter in that table on any related table. Means it should be true.

IsFilteredshould work, where there is a filter on that column.

isInScope means the column is in row context.

 

Basis this can give an example of what value is wrong.

Can you share a sample pbix after removing sensitive data, highlighting what is wrong.

 

 

 

@amitchandak


I uploaded the pbix-file here: removed problem no longer relevant


The problem is the following:


I use two variables for which i calculate the amount of blank entries in different table of the same drill-down level. The variables are Bla (exercise worksheets) and Auf (exercises).

If you look at the picture above you can see that on the top-level Isfiltered and InScope return the right variable (Bla) while IsCrossfiltered return the wrong one (Auf).
The same happens if I select a specific dimension (Selbstlerntest 04c) on the top level .
If I drill-down to the bottom level Isfiltered and InScope return the wrong variable (Bla) while IsCrossfiltered returs the right one (Auf).

If I now select a specific dimension (Datenqualität) you can see that Isfiltered and IsCrossfiltered return the right variable (Auf) while InScope still returns the wrong one (Bla).


So no option is right in every case.


If you have an idea for an solution that would be great.

 

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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