cancel
Showing results for 
Search instead for 
Did you mean: 
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
Winner of T-Shirt Design

Power BI T-Shirt Design Challenge 2023

Find out who won the T-Shirt Design Challenge and the top 3 finalists.

March 2023 Update3

Power BI March 2023 Update

Find out more about the March 2023 update.