cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jracer007 Member
Member

Negative and Positive

Hello,

I have two tables, one has the name of articles and its date of creation. The other table has positive (1) and negative (-1) votes in a single column.
How can I visualize the number of positive and negative votes for each article?

powerbi_articles.png

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Negative and Positive

I would imagine something like:

 

PositiveCount = CALCULATE(SUM(Table[Column]),Table[Column] = 1)

NegativeCount = CALCULATE(SUM(Table[Column]),Table[Column] = -1) * -1

I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

View solution in original post

2 REPLIES 2
Highlighted
Super User
Super User

Re: Negative and Positive

I would imagine something like:

 

PositiveCount = CALCULATE(SUM(Table[Column]),Table[Column] = 1)

NegativeCount = CALCULATE(SUM(Table[Column]),Table[Column] = -1) * -1

I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

View solution in original post

jracer007 Member
Member

Re: Negative and Positive

It worked, but I have some articles that do not have votes and when I put your formula they disappeared.

Thanks.

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)