Distinct count filtered by condition using Power BI Dax

0 votes

I have a data set with publishers with revenue by month. Publishers are considered to be "active" month if their revenue is equal or greater than 1000 for a given month.

Now, I want to count the distinct number of "active" publishers over a monthly trend using Power BI (DAX).

Here is a measure formula that I attempted:

DistCountActiveMonths = CALCULATE(DISTINCTCOUNT('Net Revenue Data'[Publisher Name]),FILTER('Net Revenue Data','Net Revenue Data'[Active Month]=1))

But i think i need to make changes, can you please tell how do i modify the formula?

Oct 5, 2018 in Power BI by lina
• 8,220 points
37,681 views

1 answer to this question.

0 votes

Try this, it should work:

DistinctCountActiveMonths =
CALCULATE(
    DISTINCTCOUNT( 'Net Revenue Data'[Publisher Name] )
    ,'Net Revenue Data'[Active Month] = 1
)

For in-depth explanation check out Power BI Training offered by Edureka.

answered Oct 5, 2018 by Kalgi
• 52,350 points
it does work. Thanks
Works perfectly. Thank you!

Related Questions In Power BI

0 votes
1 answer

Power BI (DAX): Distinct Count Filtered by Condition

You can go with this: DistinctCountActiveMonths = CALCULATE( ...READ MORE

answered Nov 18, 2020 in Power BI by anonymous
• 65,770 points
5,359 views
0 votes
1 answer

Cumulative distinct count filtered by last value - DAX

MyFilteredCumulativeMeasure = COUNTROWS( FILTER( ...READ MORE

answered Nov 18, 2020 in Power BI by anonymous
• 65,770 points
2,085 views
+1 vote
0 answers

How can I count the distinct values in a column using Power BI?

How can I count the distinct values ...READ MORE

Oct 23 in Power BI by Evanjalin
• 7,490 points
194 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,648 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,220 points

edited Oct 11, 2018 by Kalgi 2,486 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
• 52,350 points
1,177 views
0 votes
2 answers

Power BI Dax Multiple IF AND Statements

HI I have Column Patient 12 13 14 15 18 IN Patient=12, 13 Out ...READ MORE

answered May 23, 2019 in Power BI by VNK
18,968 views
0 votes
1 answer

Dax code for calculated columns

I would recommend you to adjust the ...READ MORE

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

Group by columns on Power BI

On power BI desktop, do the following Add ...READ MORE

answered Sep 25, 2018 in Power BI by Kalgi
• 52,350 points
1,009 views
+2 votes
2 answers

Power BI service throwing 403 error when using token to embed Power BI report

To add to @Kalgi's answer, Also make ...READ MORE

answered Oct 3, 2018 in Power BI by Nilesh
• 7,060 points
6,235 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