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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
H3nning
Helper V
Helper V

Measure not affected by Slicer

Hi,

i have this measure and I wonder why it is not affected by my slicer A and B

COUNTROWS(
                    FILTER(
                        SUMMARIZE(FILTER(ALLEXCEPT(Werte_kurz,Firmendimension[A],Firmendimension[B]), Werte_kurz[_*EndeDatum] >= MinDatum && Werte_kurz[_*StartDatum] <= MaxDatum)
                            ,Werte_kurz[_Firma]
                        ),
                        NOT(ISBLANK(Werte_kurz[_Firma]))
                    )
                )
 
are nested Filter Expression killing the context filter somehow?
 
Firmendimension is a connected dimensional table (* to1) and MaxDatum and MinDatum are variables. The measure at it is is not my problem. It is about the non functioning slicesr.
 
Thank you!!!
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @H3nning ,

The Table data is shown below:

vzhouwenmsft_0-1710919900623.png

vzhouwenmsft_1-1710919912222.png

The relationship between tables is as follows:

vzhouwenmsft_2-1710920000384.png

Regarding your question, there should be a problem with the dax expression you provided, please follow these steps:
1. Use the following DAX expression to create a measure (Replace 'Date(2024.2.1)' and 'Date(2024.2.15)' with 'MinDatum' and 'MaxDatum' in the expression)

Measure = CALCULATE(
    COUNTROWS(
        FILTER(
            SUMMARIZE(FILTER('Werte_kurz','Werte_kurz'[StartDatum] >= DATE(2024,2,1) && 'Werte_kurz'[EndDatum] <= DATE(2024,2,15)),[Firma]),
            NOT(ISBLANK('Werte_kurz'[Firma])))),ALLEXCEPT(Werte_kurz,'Firmendimension'[A],'Firmendimension'[B]))

2. Final output ("Measure2" is the dax expression you supplied.)

vzhouwenmsft_3-1710920117774.png

vzhouwenmsft_4-1710920129095.png

Best Regards,
Wenbin Zhou
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

2 REPLIES 2
Anonymous
Not applicable

Hi @H3nning ,

The Table data is shown below:

vzhouwenmsft_0-1710919900623.png

vzhouwenmsft_1-1710919912222.png

The relationship between tables is as follows:

vzhouwenmsft_2-1710920000384.png

Regarding your question, there should be a problem with the dax expression you provided, please follow these steps:
1. Use the following DAX expression to create a measure (Replace 'Date(2024.2.1)' and 'Date(2024.2.15)' with 'MinDatum' and 'MaxDatum' in the expression)

Measure = CALCULATE(
    COUNTROWS(
        FILTER(
            SUMMARIZE(FILTER('Werte_kurz','Werte_kurz'[StartDatum] >= DATE(2024,2,1) && 'Werte_kurz'[EndDatum] <= DATE(2024,2,15)),[Firma]),
            NOT(ISBLANK('Werte_kurz'[Firma])))),ALLEXCEPT(Werte_kurz,'Firmendimension'[A],'Firmendimension'[B]))

2. Final output ("Measure2" is the dax expression you supplied.)

vzhouwenmsft_3-1710920117774.png

vzhouwenmsft_4-1710920129095.png

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

Thank you @Anonymous ! Funny thing I tried this, but kept the allexept in the the place where i had it in the original expression. So two times allexept, one in the spot of my original expression and one as in the solution. Like this:

CALCULATE(
    COUNTROWS(
        FILTER(
            SUMMARIZE(FILTER(ALLEXCEPT(Werte_kurz,'Firmendimension'[A],'Firmendimension'[B]),'Werte_kurz'[StartDatum] >= DATE(2024,2,1) && 'Werte_kurz'[EndDatum] <= DATE(2024,2,15)),[Firma]),
            NOT(ISBLANK('Werte_kurz'[Firma])))),ALLEXCEPT(Werte_kurz,'Firmendimension'[A],'Firmendimension'[B]))

That didn't work out and slicer didnt work, although the measure did not throw any errors. Can someone explain why?

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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