Expression assistance required please

  • Hello

    I have one column in a table that shows the total number of transactions. This can be toggled to show how long the transaction took to complete - eg 10 for 10 minutes, etc.

    I have added another column where I would like to give the total of transactions where the time to do the transaction is listed as 0 (zero).

    I have tried things like =count(fields!transactiontime.value < 1) but this just returns the total of all transactions, not those <0.

    Any suggestions for this elementary yet infuriating problem would be appreciated - thanks.

  • Which tool are you working with?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Thanks for replying - SSRS 2008 R2

  • OK. Is it possible to give some sample data and the desired output?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Thanks.

    It's very simple:

    One field is called transaction time, and returns a value that shows how long the transaction took place, and that can be anything from 0 to 100.

    I build a table using the wizard, showing the number of transactions over a certain period. I then added a column showing AVG transaction time. All I want to do is give a total of the transactions that = 0. My expressions above seem logical, but return the total number of transactions, not the number that = 0.

    Thanks, if you need more please let me know. Apologies I am very new to SSRS.

  • A picture may be worth a thousand words, but some sample data is priceless. Can't test what we can't model, so please post some. Otherwise, I doubt you can get really useful help.

  • Thanks for taking the trouble to reply.

    Will bear in mind for next time, thanks. In the end I solved this knotty conundrum via:

    =Sum(Iif(Fields!transactiontime.Value = 0, 1, 0))

    Which worked like a dream.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply