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.
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.
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?
Very Reags.
Solved! Go to Solution.
You can do it two ways:
Measure to Display := IF( ISBLANK([PercentageOfPositives2]), 0, [PercentageOfPositives2] )
PercentageOfPositives := VAR result = [PositiveCount2]/([NegativeCount2] + [PositiveCount2]) RETURN IF( ISBLANK(result), 0, result )
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:
Measure to Display := IF( ISBLANK([PercentageOfPositives2]), 0, [PercentageOfPositives2] )
PercentageOfPositives := VAR result = [PositiveCount2]/([NegativeCount2] + [PositiveCount2]) RETURN IF( ISBLANK(result), 0, result )
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
97 | |
75 | |
65 | |
53 |
User | Count |
---|---|
144 | |
103 | |
98 | |
85 | |
64 |