Forum Discussion
3s
7 months agoRegular Visitor
No results
Hi, I am new in here and in Dax. I couln't find a similar question, so hopefully someone can help. I am trying to achieve the same as Excel: countif(B:B;B2;A:A;D2). This is what I am doing: Count...
- 7 months ago
Hi 3s
Have tried this in desktop with your sample data. Please let me know the exact requirement/logic if it does not work.
- 7 months ago
Hi,
These calculated column formulas work
=CALCULATE(COUNTROWS(Data),FILTER(Data,Data[member]=EARLIER(Data[member])&&Data[year]=EARLIER(Data[year+1])))+0=CALCULATE(COUNTROWS(Data),FILTER(Data,Data[member]=EARLIER(Data[member])&&Data[year]=EARLIER(Data[year-1])))+0Hope this helps.
JamieHolding
Resolver I
7 months agoCount =
VAR vB = SELECTEDVALUE('Table'[ID])
VAR vD = SELECTEDVALUE('Table'[Year+1])
RETURN
IF(
NOT(ISBLANK(vB)) && NOT(ISBLANK(vD)),
COUNTROWS(
FILTER(
ALLEXCEPT('Table', 'Table'[ID], 'Table'[Year+1]),
'Table'[ID] = vB && 'Table'[Year] = vD
)
),
BLANK()
)
It's a little hard to test without the data but can you try this?