The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi Everyone,
I am trying to create a calculated column to flag the number of duplicates, where if the patient "[NHS_Number_Nat_Pseud]"
has called "[EMAS Call Connect Date]" more than 5 times within a month, I have created the following but to no success
Any help on this would be much appricated
Thanks
Nagin
Solved! Go to Solution.
Hi @Nagin
please try
EMAS Reattendance Month =
VAR CurrentMonth =
MONTH ( EMAS[EMAS Call Connect Date] )
VAR CurrentYear =
YEAR ( EMAS[EMAS Call Connect Date] )
VAR CurrentIDtable =
CALCULATETABLE ( EMAS, ALLEXCEPT ( EMAS, EMAS[NHS_Number_Nat_Pseud] ) )
VAR FilteredTable =
FILTER (
CurrentIDtable,
EMAS[NHS_Number_Nat_Pseud] <> BLANK ()
&& MONTH ( EMAS[NHS_Number_Nat_Pseud] ) = CurrentMonth
&& YEAR ( EMAS[NHS_Number_Nat_Pseud] ) = CurrentYear
)
RETURN
IF ( COUNTROWS ( FilteredTable ) > 5, "Yes", "No" )
@Nagin
Great to hear that!
Kindly conisder marking my reply as acceptable solution
Hi @Nagin
please try
EMAS Reattendance Month =
VAR CurrentMonth =
MONTH ( EMAS[EMAS Call Connect Date] )
VAR CurrentYear =
YEAR ( EMAS[EMAS Call Connect Date] )
VAR CurrentIDtable =
CALCULATETABLE ( EMAS, ALLEXCEPT ( EMAS, EMAS[NHS_Number_Nat_Pseud] ) )
VAR FilteredTable =
FILTER (
CurrentIDtable,
EMAS[NHS_Number_Nat_Pseud] <> BLANK ()
&& MONTH ( EMAS[NHS_Number_Nat_Pseud] ) = CurrentMonth
&& YEAR ( EMAS[NHS_Number_Nat_Pseud] ) = CurrentYear
)
RETURN
IF ( COUNTROWS ( FilteredTable ) > 5, "Yes", "No" )
@Nagin
Great to hear that!
Kindly conisder marking my reply as acceptable solution
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
32 | |
13 | |
10 | |
10 | |
9 |