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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
areias_br
Helper I
Helper I

Count Rows Based on Slicer Value

Hi...

I need to find out the correct way to complete the formula below based on the input of the user in a slicer that filters a collumn: "Tabela_Ações"[Módulo].

 

Actions Overdue = 

COUNTROWS (

    FILTER (

        'Tabela_Ações',

        'Tabela_Ações'[Data do Evento] < tb_Acompanhamento_Semanal[Data]

            && 'Tabela_Ações'[Status 90D Criteria] = "Open Overdue"

            && 'Tabela_Ações'[Módulo] = VALUEOFTHESELECTEDSLICER

    )

)

 

Any way to solve this? Tables are not related. In my mind it should be simple, but I have tried different solutions no results so far.



3 REPLIES 3
Anonymous
Not applicable

Thank you @TomMartens  for your prompt reply.

Hi @areias_br  ,
Depending on the information you have provided, would you be able to provide more data (without private information) so that we can better understand and solve the problem you are experiencing.

 

How to Get Your Question Answered Quickly - Microsoft Fabric Community

If it does not help, please provide more details with your desired out put and pbix file without privacy information.

 

Best Regards,

Ada Wang

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

TomMartens
Super User
Super User

Hey @areias_br,

 

I recommend this approach:

Actions Overdue = 
var valuesfromslicer = values( 'Tabela_Ações'[Módulo] )
return
COUNTROWS (

    FILTER (

        'Tabela_Ações',

        'Tabela_Ações'[Data do Evento] < tb_Acompanhamento_Semanal[Data]

            && 'Tabela_Ações'[Status 90D Criteria] = "Open Overdue"

            && 'Tabela_Ações'[Módulo] IN valuesfromslicer

    )

)

If you are using IN instead of = it will become possible to process a multiselection in the measure.

If you do not want use multiselect you can use the below approach, but then you might consider to provide a default value:

Actions Overdue = 
var slicervalue = SELECTEDVALUE( 'Tabela_Ações'[Módulo] , "defaultvalue" )
return
COUNTROWS (

    FILTER (

        'Tabela_Ações',

        'Tabela_Ações'[Data do Evento] < tb_Acompanhamento_Semanal[Data]

            && 'Tabela_Ações'[Status 90D Criteria] = "Open Overdue"

            && 'Tabela_Ações'[Módulo] = slicervalue

    )

)

Hopefully this provides what you are looking for.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Hi,

It didn't work 😞

When I click the slicer the values of the graph don't change.

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.