Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

CALCULATE based on filters in each columns and sum of each returned value.

Can you suggest what I'm doing wrong here.

 

I want to count string "Primary" from different columns.

 

TotalPrimarySupervison = CALCULATE(
COUNTAX(FILTER(Table1,Table1[Primary/Secondary1]="Primary"), Table1[SPE/DGO/school counsellor/psychologist])||
COUNTAX(FILTER(Table1,Table1[Primary/Secondary2]="Primary"), Table1[SPE/DGO/school counsellor/psychologist])||
COUNTAX(FILTER(Table1,Table1[Primary/Secondary3]="Primary"), Table1[SPE/DGO/school counsellor/psychologist])||
COUNTAX(FILTER(Table1,Table1[Primary/Secondary4]="Primary"), Table1[SPE/DGO/school counsellor/psychologist])||
COUNTAX(FILTER(Table1,Table1[Primary/Secondary5]="Primary"), Table1[SPE/DGO/school counsellor/psychologist])||
COUNTAX(FILTER(Table1,Table1[Primary/Secondary6]="Primary"), Table1[SPE/DGO/school counsellor/psychologist]))

 

TotalPrimarySupervison = CALCULATE(
COUNTAX(FILTER(Table1,
Table1[Primary/Secondary1]="Primary" ||
Table1[Primary/Secondary2]="Primary" ||
Table1[Primary/Secondary3]="Primary" ||
Table1[Primary/Secondary4]="Primary" ||
Table1[Primary/Secondary5]="Primary" ||
Table1[Primary/Secondary6]="Primary"),
Table1[SPE/DGO/school counsellor/psychologist]))


TotalPrimarySupervison = CALCULATE(
[....] --?
(FILTER(
Table1,
Table1[Primary/Secondary1]="Primary" ||
Table1[Primary/Secondary2]="Primary" ||
Table1[Primary/Secondary3]="Primary" ||
Table1[Primary/Secondary4]="Primary" ||
Table1[Primary/Secondary5]="Primary" ||
Table1[Primary/Secondary6]="Primary"
)
))

 

Many thanks in advance.

0 REPLIES 0

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors