Forum Discussion
Help with DAX measure
- 6 years ago
In that case, then somthing like this should work:
Measure = VAR __Table = SUMMARIZE( 'Table',[Project], "__Comp",[Comparison] ) RETURN IF(COUNTROWS(FILTER(__Table,[Comparison] <> 0)) = 0,"Good","Bad")
Well, it is very difficult to be specific because you talk about a person and wanting to display by person but there is no person in the sample data and no information about if the person name is in the table or another related table, how those tables are related, etc.
So, I can provide a general solution. Use SUMMARIZE or GROUPBY to summarize by person and by project and add in your Comparison measure/column. Filter that such that you filter out any 0's for Comparison. Do a COUNTROWS. If COUNTROWS is 0/BLANK then no discrepencies. Otherwise, discrepencies.
Greg_Deckler Sorry about the confusion/vagueness within my first post. I have a table that contains Projects, a table that contains Employees, a table that contains time from System 1, a table that contains time for System 2, and a table that contains the Pay Period Dates as well as a number of other tables that provide additional information that help to create all of the relationships between the tables. Employee is not included in the sample data matrix because it is not a field in that matrix. Instead, I have used a slicer to allow the user to filter by Employee.
I hope that helps. --Shauna
- Greg_Deckler6 years agoCommunity Champion
In that case, then somthing like this should work:
Measure = VAR __Table = SUMMARIZE( 'Table',[Project], "__Comp",[Comparison] ) RETURN IF(COUNTROWS(FILTER(__Table,[Comparison] <> 0)) = 0,"Good","Bad")- smstrickland6 years agoHelper I
Greg_Deckler Thank you so much! This worked (and I marked it as a solution), but I would prefer for blanks to be considered "Bad." How should I change the IF statement to accomplish that?
- Greg_Deckler6 years agoCommunity Champion
smstrickland - Great! Not sure I follow though on your follow-up question.
Measure = VAR __Table = SUMMARIZE( 'Table',[Project], "__Comp",[Comparison] ) RETURN IF(COUNTROWS(FILTER(__Table,[Comparison] <> 0)) = 0,"Bad","Good")?