Count occurrences in DAX

0 votes

I need to count the no of occurrences of each value in the column with duplicates from the table mentioned below

Column A

1

2

3

1

2

3

4

I need 

Column A

Occurrence

1

2

2

2

3

2

1

2

2

2

3

2

4

1

Mar 9, 2019 in Power BI by Phalguni
• 1,020 points
26,295 views

1 answer to this question.

0 votes

You can use DAX functions to do so, which will be:

Occurence = 
COUNTX (
    FILTER ( yourTable, EARLIER ( yourTable[Col A] ) = yourTable[Col A] ),
    yourTable[Col A]
)

COUNTX -This function Counts the number of rows of that table that contain a number or an expression that evaluates to a number when evaluating an expression over 

answered Mar 9, 2019 by Avantika
• 1,520 points

Related Questions In Power BI

0 votes
1 answer

DAX : Occurrences of "count"

Try this for creating a calculated column ...READ MORE

answered Nov 22, 2018 in Power BI by Upasana
• 8,620 points
5,707 views
0 votes
1 answer

How do I count rows in one table based on values in another table using DAX?

If the tables are related, this is ...READ MORE

answered Sep 24, 2020 in Power BI by Gitika
• 65,890 points
22,556 views
0 votes
1 answer

Distinct count filtered by condition using Power BI Dax

Try this, it should work: DistinctCountActiveMonths = CALCULATE( ...READ MORE

answered Oct 5, 2018 in Power BI by Kalgi
• 52,350 points
37,590 views
0 votes
1 answer

Dax query in power bi

Here is my table before I have ...READ MORE

answered Oct 22, 2018 in Power BI by Hannah
• 18,540 points
1,032 views
0 votes
1 answer

list reports with calculated percentage in Power BI using dax

Create a Measure called Total Revenue: Total Revenue = SUMX( ...READ MORE

answered Oct 22, 2018 in Power BI by Hannah
• 18,540 points
1,587 views
0 votes
1 answer

How to calculate cumulative Total and % in DAX?

Hi, If your table is ready with percentage ...READ MORE

answered Mar 18, 2019 in Power BI by Cherukuri
• 33,030 points
18,979 views
0 votes
1 answer

Dax: Sum of values from many columns in a row

Yes, you can. Try to "Unpivot other columns" ...READ MORE

answered Apr 3, 2019 in Power BI by Upasana
• 8,620 points
10,389 views
0 votes
1 answer

count of string in pie chart

Hi Prakash, Select the measure and measure that ...READ MORE

answered May 7, 2019 in Power BI by Cherukuri
• 33,030 points
1,612 views
0 votes
1 answer

How do you create a link visual in Power BI?

You can easily create a link between ...READ MORE

answered Mar 9, 2019 in Power BI by Avantika
• 1,520 points

edited Mar 9, 2019 by Avantika 5,088 views
0 votes
1 answer

How do I convert month format in Power BI?

Hi, This can easily be done using DAX ...READ MORE

answered Mar 27, 2019 in Power BI by Avantika
• 1,520 points
4,947 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP