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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
DiePic
Resolver II
Resolver II

filter table with right output

Hi everyone,
I have a measurement that gives the right output.... this is the measurement code:

-
Tempo_Risposta_Count =
VAR ReplyTime = VALUE(SELECTEDVALUE(Ticket_Data[TktTempoAccettazione]))
VAR TabellaFiltrata =
    FILTER(
        Ticket_Data,
         ReplyTime > 60
    )
VAR ContaRows = COUNTROWS(TabellaFiltrata)
VAR Result = ContaRows
RETURN Result
-

....

and the result is correct if I insert this formula into my matrix table as you can see in the image below.
DiePic_0-1696530193817.png

 

but I can't get the total in a card

DiePic_1-1696530512680.png

 

Where am I doing wrong?
Thanks in advance for any suggestions

 

1 ACCEPTED SOLUTION
6 REPLIES 6
DiePic
Resolver II
Resolver II
ChiragGarg2512
Super User
Super User

@DiePic , This measure is working for a selected value of TktTempoAccettazione, so if no value is selected for TktTempoAccettazione then the measure has nothing to work on and hence returns empty. Try putting a slicer next to it with TktTempoAccettazione as the field for it, this should put some value in the card visual.

 

Thank you.

Hi @ChiragGarg2512 

thanks for reply.
I thought that countrows (VAR ContaRows = COUNTROWS(TabellaFiltrata)) will return the value ...
can you give me an example of what you suggest (... Try putting a slicer next to ....)?
thanks in advance

 

@DiePic If this helps mark solution.

That just means to use a slicer with TktTempoAccettazione field. After a selection is made, the measure will have a field to work on.

Now with this measure (last column) 

Tempo_Risposta_Concordato_Count =
//
  VAR ReplyTime = VALUE(SELECTEDVALUE(Ticket_Data[TktTempoAccettazione]))
  //
    VAR Filtra =
    IF(ReplyTime < 61
      , 0
      ,IF([Tempo_Risposta_Concordato] = 0
        ,0
        ,IF(([Tempo_Risposta_Concordato] - ReplyTime) >= 0
          ,0
          ,1
        )
      )
    )  
VAR Result = VALUE(Filtra)
RETURN Result
I can distinguish with numbers the rows with values .... but as you can see in the card (on the right "1ma Risposta"), I'm not able to have a sum.

DiePic_0-1696847766694.png

 

Thanks for any idea or suggestion
@ChiragGarg2512 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

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.