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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
krishna0
Helper II
Helper II

Filter as a measure - applying to single item

Hello!

 

I have a problem concerning filters.

krishna0_0-1674730517650.png

As you can see I have a single card, which task is to count items regardless of the filter from the context. I have put all necessary filters into this card as well:

krishna0_1-1674730595721.png

But the last one, I can't come up with, is actually somehow related to disregarded slicer and I need to show items that has values in column "ClosingIteration" empty or equal to SELECTEDVALUE ( Iteration ) as per screenhsots. Iteration is taken from another table and relation looks like this: 

krishna0_2-1674730699220.png

Names are the same, but I struggle to create a measure that will, e.g. be 1 in case of blank/<iteration name> and adding it to the filter pane. I know that filters shows aggregations and the measure should calculate such values per row, but my intuition says that it is possible, thus hard for me to achieve.

 

Any tips?

2 REPLIES 2
krishna0
Helper II
Helper II

Hello, any advices on this topic?

krishna0
Helper II
Helper II

I have even reproduced number of records I want to drill through to (I was thinking about filter because I can't drill from this field):

krishna0_0-1674743061963.png

Measure_1
    =
    VAR _selectedIter =
        SELECTEDVALUE ( IterDates[IterationLevel2] )
    VAR _StartDate =
        CALCULATE (
            MAX ( IterationToDate[DateOnly] ),
            FILTER (
                ALL ( IterationToDate ),
                IterationToDate[CorrectStartIter] = SELECTEDVALUE ( IterDates[IterationLevel2] )
            )
        )
    VAR _checker =
        CALCULATE (
            COUNTROWS ( WorkItems ),
            FILTER (
                ALL ( workitems ),
                OR (
                    ISBLANK ( WorkItems[ClosingIteration] ),
                    WorkItems[ClosingIteration] = _selectedIter
                )
                    && NOT ISBLANK ( WorkItems[TagNames] )
                        && AND (
                            NOT ISBLANK ( WorkItems[StartDate] ),
                            WorkItems[StartDateDay] <= _StartDate
                        )
                        && WorkItems[WorkItemType] = "Feature"
                        && WorkItems[State] <> "Removed"
            )
        )
    RETURN
        _checker

But I can't make it filter to filter out table. Please advise.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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