Forum Discussion
rpar
1 year agoNew Member
Help needed on displaying closed cases while comparing todays data with yesterdays data extract
Hello everybody - Hope your having a great day ! Need your expert advise on the below scenario. I have two table, Table 1 which is the new table extracted today being compared over table 2 ex...
- Anonymous1 year ago
Sahir_Maharaj
Super User
1 year agoHello rpar,
Can you please try this approach:
Closed_Display_Combined =
VAR CurrentCategory = SELECTEDVALUE(Table1[Category])
VAR CurrentCount =
CALCULATE(
COUNTROWS(Table1),
Table1[Category] = CurrentCategory
)
VAR ClosedCount =
CALCULATE(
COUNTROWS(Table2),
Table2[Category] = CurrentCategory,
NOT Table2[PrimaryKey] IN VALUES(Table1[PrimaryKey])
)
RETURN
IF(
ClosedCount > 0,
FORMAT(CurrentCount, "#") & " (Closed in previous " & FORMAT(ClosedCount, "#") & ")",
FORMAT(CurrentCount, "#")
)
rpar
1 year agoNew Member
Thanks for taking time out Sahir_Maharaj !
Tried the above query , it still shows the full count of table 1 and not the desired closed count of table 2 (4 in this example). Even if am able to get the output of 4 thats fine .