cancel
Showing results for 
Search instead for 
Did you mean: 
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
TarunSharma
Responsive Resident
Responsive Resident

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.

TarunSharma
Responsive Resident
Responsive Resident

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

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Top Solution Authors
Top Kudoed Authors