Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,293,801
Community Members
 
Community Events
165
Community Groups

Query returning No Row

Hello,

I find out the following behaviour.
Cannot really say if it's a bug or not, but it is not that straight forward.

Here is the case.

A table with 3 columns Area / Activity / Status.
Status column contains a percentage "as text" or NA : 0%, 25%... NA

Out of this table I am trying to compute a percentage of completion per Area excluding the NA (some Activities are not relevant).

I am using the following query (probably not the most efficient one, but might be treated in another topic probably)

SELECT Area, (Sum(Status) / (100 * COUNT(Activity)))*100 AS 'Completed', (1 - Sum(Status) / (100 * COUNT(Activity)))*100 AS 'Remaining'
FROM T*
WHERE Status >= 0
GROUP BY Area

If the first non-empty row of my input table contains the NA value for the Activity, the query returns No Row.

Ex:

INPUT TABLE

AREA / Activity / Status
area1 / act1       /
area1 / act2      / NA
area1 / act3      / 10%
area1 / act4      / NA

Result : No row

Expected:

AREA / Completed / Remaining
area1 / 10 / 90

If, on the other hand the first non-empty row contains a value (in percentage), it works fine. Computing the completion percentage.

Ex:

INPUT TABLE

AREA / Activity / Status
area1 / act1       /
area1 / act2      / 100%
area1 / act3      / 10%
area1 / act4      / NA

Result:

AREA / Completed / Remaining
area1 / 55 / 45

 

Thank you for your help in advance

Regards

Cédric

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

Marketplace Partner Spotlight: AppLiger

This month the spotlight is on AppLiger. We caught up with Pavel Pavlovsky, CEO and Product Manager, to learn how the company started and what fuels the team's creativity.    Atlassian:...

336 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you