DAX : Occurrences of "count"

0 votes

So I have a table;

Now, I want to apply some dax instructions to that table, and display this data in a chart. In other words,  if it is the first time that the Country's name appears, it must show 1 and 2 for the second time.

Can anybody help me? Thanks.

Nov 21, 2018 in Power BI by Shubham
• 12,110 points
261 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Try this for creating a calculated column called Occurrences:

Occurrences =
CALCULATE (
    COUNT ( [Pais] ),
    FILTER (
        'Table',
        [Index] <= EARLIER ( 'Table'[Index] )
            && [Pais] = EARLIER ( 'Table'[Pais] )
    )
)

Index must be an incremental key in each row.

Let me know if this helps.

answered Nov 21, 2018 by Upasana
• 7,480 points

Related Questions In Power BI

0 votes
1 answer

Count occurrences in DAX

You can use DAX functions to do ...READ MORE

answered Mar 9 in Power BI by Avantika
• 980 points
61 views
0 votes
1 answer

Max count of workspaces per one PRO user

Right now, it is 250, will be ...READ MORE

answered Sep 24, 2018 in Power BI by Hannah
• 14,080 points
13 views
0 votes
1 answer

Calculating MoM Variance of a Measure Field using DAX

Create an intermediate calculated column that considers ...READ MORE

answered Feb 28 in Power BI by Shubham
• 12,110 points
121 views
0 votes
1 answer

Add Column Count_of_people across two tables to get the count of people from a city.

Hi Anitha, 1. Merge both tables, using City ...READ MORE

answered Mar 22 in Power BI by CHERUKURI
• 12,780 points
11 views
+3 votes
2 answers

Combine tables in Power BI

You can also achieve this using a ...READ MORE

answered Oct 5, 2018 in Power BI by lina
• 8,100 points

edited Oct 11, 2018 by Kalgi 84 views
0 votes
1 answer

Power Bi Dax Table

You need to wrap the numbers in ...READ MORE

answered Oct 5, 2018 in Power BI by Kalgi
• 35,720 points
41 views
0 votes
1 answer

Power BI Dax Multiple IF AND Statements

I suspect your issue is that alphabetically ...READ MORE

answered Oct 5, 2018 in Power BI by Kalgi
• 35,720 points
3,534 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
• 35,720 points
1,903 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 in Power BI by Upasana
• 7,480 points
14 views
0 votes
1 answer

Calculate Time Intersection to Correlate Sequences of Independent Events

I think this solution requires a CROSS JOIN implementation. ...READ MORE

answered Oct 26, 2018 in Power BI by Upasana
• 7,480 points
31 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.