cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper IV
Helper IV

Values Show values ​​that do not have a related value in another table

Hello community I have a concern, it turns out that I have two tables, one stores the information of articles and the other stores the voting data of those articles. When I calculate the positive percentage of votes and put it on my display everything looks good.

 

power bi_diego6.png
However, not all my articles have votes. How do I make sure that articles that do not have votes in my visualization do not disappear?

 

power bi_diego7.png

 

Very Reags.

1 ACCEPTED SOLUTION

You can do it two ways:

 

  1. You have an outer measure that performs the calculation to add the zeros and display the outer measure:
    Measure to Display :=
    IF(
        ISBLANK([PercentageOfPositives2]),
        0,
        [PercentageOfPositives2]
    )
  2. You add the IF clause to your PercentOfPositives2 measure:
    PercentageOfPositives :=
    VAR result = [PositiveCount2]/([NegativeCount2] + [PositiveCount2])
    RETURN
    IF(
        ISBLANK(result),
        0,
        result
    )

View solution in original post

3 REPLIES 3
Resolver III
Resolver III

Because the articles have no votes, they are blank and therefore will not show up in visuals. In order to get around this, you need to display the values as zeros instead of blanks. That can be accomplished with something like this:

 

Measure :=
IF(
        ISBLANK([Percentage of votes]),
        0,
        [Percentage of votes]
)

How could I apply that to my Measure?

PercentOfPositives2 = [PositiveCount2]/([NegativeCount2] + [PositiveCount2])

You can do it two ways:

 

  1. You have an outer measure that performs the calculation to add the zeros and display the outer measure:
    Measure to Display :=
    IF(
        ISBLANK([PercentageOfPositives2]),
        0,
        [PercentageOfPositives2]
    )
  2. You add the IF clause to your PercentOfPositives2 measure:
    PercentageOfPositives :=
    VAR result = [PositiveCount2]/([NegativeCount2] + [PositiveCount2])
    RETURN
    IF(
        ISBLANK(result),
        0,
        result
    )

View solution in original post

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors