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,769 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
6,050 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,770 points
23,039 views
0 votes
1 answer

I want to calculate the distinct count of active customers but only for the last three completed months—how can I do this in DAX?

To calculate the distinct count of active ...READ MORE

answered 3 days ago in Power BI by anonymous
• 19,330 points
36 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,867 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,520 points
1,135 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,520 points
1,721 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
19,287 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,828 views
0 votes
1 answer

How do you create a link visual in Power BI?

Select the first visualisation go to the ...READ MORE

answered Oct 10, 2023 in Power BI by Monika kale

edited Mar 5 5,587 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
5,210 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