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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
rbalza
Helper III
Helper III

Help - DAX Measure with DISTINCTCOUNT and FILTER

Hi Ya'll,

 

I am new to power bi and I wanted to create two measures that have multiple filters in them.
So I have this sample table that needs to work on.  Two measures would be like:

 

FirstMeasure = Filter Id to get the distinct value and then filter the workday and work hours column (which will be then display on a table/matrix)

 

SecondMeasure = Filter Customer Id to get the distinct value and then filter the work day column by ="Sunday", and take the pay wages, pay rate and margin columns.

 

01.JPG
First measure should be look like this:
02.JPG

Second measure would be look like this:

03.jpg

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hello @rbalza 

You can plot these measures and desired columns in the matrix.

FirstMeasure = DISTINCTCOUNT('TABLE'[ID])

SecondMeasure =
CALCULATE(
[FirstMeasure],
'TABLE'[Work Day] = "Sunday"
)

Please share sample data in table format.
Check this How to Get Your Question Answered Quickly  

View solution in original post

2 REPLIES 2
daxer-almighty
Solution Sage
Solution Sage

Hi @rbalza 

 

I would strongly and kindly suggest that before you do any work in PBI you try to familiarize yourself with PBI and DAX, their philosophy, capabilities and terminology. There are plenty of material on the net. But start with the basics. You could even start with the Microsoft Docs or Power BI Tutorial for Beginners - Basics and Beyond - YouTube.

Anonymous
Not applicable

Hello @rbalza 

You can plot these measures and desired columns in the matrix.

FirstMeasure = DISTINCTCOUNT('TABLE'[ID])

SecondMeasure =
CALCULATE(
[FirstMeasure],
'TABLE'[Work Day] = "Sunday"
)

Please share sample data in table format.
Check this How to Get Your Question Answered Quickly  

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors