Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Nisham
Regular Visitor

Return difference values between two DAX measures

Hi. I have a requirement where I need to compare 2 measures and show the result when filtered to a Date.Month. Both the measures calculates distinct customers. 

Measure - 1

Dist. Cust. All = Calculate(DISTINCTCOUNT(Sales[Customer No_]),REMOVEFILTERS('Date Table'[Month Name]))

 

Measure - 2

Dist. Cust. = DISTINCTCOUNT(Sales[Customer No_])

 

Need the results as follows: Assuming Date.Month filter is ON. 

Measure - 1      Measure - 2          Result

     A                      B                         A

     B                      D                         C

     C

     D

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Your question is not clear.  To your slicerfilter/any visual, drag any date filed from the Date Table only.  Does this measure work?

Measure 3 = [Dist. Cust. All]-[Dist. Cust.]

If it does not, then share some data to work with, describe the question and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hello Ashish,

Thanks for your response. 

Both measures below calculates a distinct count of Customers from the same sales table. 

Measure - 1 (M1)

Distinct Customers ALL = Calculate(DISTINCTCOUNT(Sales[Customer]),

REMOVEFILTERS('Date Table'[Month Name]))

 

Measure - 2 (M2)

Distant Customers = DISTINCTCOUNT(Sales[Customer No_])

 

Basically I need to compare (M1) and (M2) and return the list of customers which do not appear in (M2) when filtered to a specific period. 

 

Hi,

Share some data to work (in a format that can be pasted in an MS Excel file) with and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.