Rock Rock
Rock Rock

Reputation: 21

issue in displaying visuals after creating measure in percentage

I am new to Power BI. I created two measures with two fields to be represented in percentage in chart. So I tired to pull those measures in the chart but it showed error. The tow measure that were created are:

`IgA% = CALCULATE(Count('Ig_Ops Referrals'[IgA]), FILTER('Ig_Ops Referrals,'Ig_Ops Referrals [Site]))

IgI% = CALCULATE(Count('Ig_Ops Referrals'[IgI]), FILTER('Ig_Ops Referrals','Ig_Ops Referrals'[Site_Lng_Des])) `

It gives the error:

measure_visual_issue

I am trying to represent two fields in percentage to created two measures for it and tried to use the chart visual, but it is not working?

Upvotes: 0

Views: 100

Answers (2)

Muppet Bear
Muppet Bear

Reputation: 152

FILTER usage is wrong. The syntax is - FILTER ( <Table>, <FilterExpression> ), where <FilterExpression> should evaluate to True/False.

You are asking DAX to interpret the text value of Ig_Ops Referrals [Site] as True/False. Those are not the same datatypes. Hence - the very clean and instructive error message.

Upvotes: 0

Dmitrij Holkin
Dmitrij Holkin

Reputation: 2055

You should use same data types columns, check if your column is both TEXT type

Upvotes: 1

Related Questions