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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.