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
36,920 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,360 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,910 points
4,676 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,910 points
1,779 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,570 points
1,333 views
0 votes
1 answer

How to rename a column using DAX in Power BI?

Hi Ramya, I found these two function that ...READ MORE

answered Aug 22, 2019 in Power BI by anonymous
• 33,030 points

edited Dec 31, 2021 by Soumya 32,693 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,080 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,360 points
921 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,404 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,570 points
796 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,360 points
677 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,050 points
5,399 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