Wanna Coffee
Wanna Coffee

Reputation: 2798

Power BI : How to count occurrence of value from source table?

I have my data source something like below.

enter image description here

I need to show output in the report as below.

enter image description here

I tried using the unpivot column and getting something like this, how to count the occurrence value of each Business value.

enter image description here

Upvotes: 0

Views: 5659

Answers (3)

Rajesh iTech
Rajesh iTech

Reputation: 1

enter image description here

I have marked two places first marked place you have to add Value column then click second marked place one dropdown value is open click count menu

Upvotes: 0

Wanna Coffee
Wanna Coffee

Reputation: 2798

We have to remove the Attribute column as the next step to Unpivot. Then my table should be looks like this.

enter image description here

Now create a new table with following Dax function, let's say the current table as Business Data (Your Unpivot table)

Occurrence Table = DISTINCT('Business Data')

Now end result table should look like this,

enter image description here

You can make use of this table for your table visual in the report.

Note: You can add n-number of rows and column into your source table and this logic will do magic to get the correct result.

Upvotes: 0

Pratik Bhavsar
Pratik Bhavsar

Reputation: 848

Plot following mesure against Value column (from your unpivot table):

Business Occurance = COUNTROWS('your unpivot table')

Upvotes: 1

Related Questions