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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
yasbos
Resolver I
Resolver I

show only row with positive amount when two identical rows but Amount is positive and negative

I have a query that returns several columns, Date, Settle, acctNum, Name, TCode, Amount. The problem is that, there are records that are identical except for the Amount, which has the same absolute value on both records except that it is positive in one and negative in the other. I need to show in the visual only the row with the positive value for Amount. Would anyone have any suggestion? Thanks.

4 REPLIES 4
Ritaf1983
Super User
Super User

Hi @yasbos 
Seems that filtering by ">0" is all you need to solve your problem.
In another case please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

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

Hi, @Ritaf1983  Thanks so much. 

I can't just filter out negatives because only negative that meet the conditions of the provided example are of interest. 

**Example:**

| Date | Settle | AcctNum | Name | TCode | Amount |
|:----:|:------:|:-------:|:----:|:-----:|:------:|
|Jan 1 | Y | 123456 | Mark | tabcd | 23450 |
|Jan 1 | Y | 123456 | Mark | tabcd | -23450 |
|Jan 7 | Y | 111111 | Vic | tabcd | 446623 |
|Mar 20 | Y | 999999 | Yas | tvfeh | 7778 |
|Jan 1 | Y | 123456 | Mark | tabcd | 987123 |
|Aug 9 | Y | 123456 | Mark | tabcd | 678599 |
|Dec 2 | Y | 564432 | Ali | tgghy | -987699 |

**Expected result:**

| Date | Settle | AcctNum | Name | TCode | Amount |
|:----:|:------:|:-------:|:----:|:-----:|:------:|
|Jan 1 | Y | 123456 | Mark | tabcd | 23450 |
|Jan 7 | Y | 111111 | Vic | tccwe | 446623 |
|Mar 20 | Y | 999999 | Yas | tvfeh | 7778 |
|Jan 1 | Y | 123456 | Mark | tabcd | 987123 |
|Aug 9 | Y | 123456 | Mark | tabcd | 678599 |
|Dec 2 | Y | 564432 | Ali | tgghy | -987699 |

Hi,

This can be done in the Query Editor.  If you are OK with doing it there, then share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Sorry, but I don't understand your question

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.