Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I am using Excel 2016 and I have two tables in my data model. Within one table, I am trying to do a DAX calculation where one of the conditions is that the column value in both tables are the same, basically an INDEX MATCH within a COUNTIF. The problem is, these column values are not unique in either table (many-to-many relationship). I can do the Excel formula quite easily (which can be found in the Desired Output sheet), I just want to replicate it in DAX.
I have tried the following, but it won't work as I don't have a related table. I would like to use the same structure if possible and replace the RELATEDTABLE function with something else so I can follow the logic. Would someone please be able to have a look at my Excel file and let me know what I need to use for this?
=
IF(
[Resource] = "SME1",
CALCULATE(
COUNTROWS(Table_Rev),
FILTER(
Table_Rev,
Table_Rev[SME1 Rem]=0
&&
Table_Rev[Consolidate]=FALSE()
),
RELATEDTABLE(Table_Rev)
)
,0)
Does your Excel DAX support the INTERSECT function?
User | Count |
---|---|
14 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
21 | |
11 | |
10 | |
10 | |
8 |