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.
I currently have a calculate divide function with several filters applied however it's taking a very long time to load. Is there any way to improve this?
DIVIDE(
CALCULATE(
COUNT('Intake_Data'[Company_Id]),
FILTER('Intake_Data','Intake_Data'[Intake_Data_Custom_1] in {"COP1","COP2"}),
FILTER('Intake_Data','Intake_Data'[Intake_Data_Grade] in {"E2","E3","E3L","R2","R3","R3L","U2","U3","U3L"})
),
CALCULATE(
COUNT('Intake_Data'[Company_Id]),
FILTER('Intake_Data','Intake_Data'[Intake_Data_Custom_1] in {"COP1","COP2"}),
ALLSELECTED() )
)
Solved! Go to Solution.
@Anonymous ,
I think some syntax error.
Please use this measure.
Measure =
VAR a =
CALCULATE (
COUNT ( 'looker_views lkr_Intake_Data'[Company_Id] ),
FILTER (
'looker_views lkr_Intake_Data',
'looker_views lkr_Intake_Data'[Intake_Data_Custom_1]
IN {
"COP1",
"COP2"
}
&& 'looker_views lkr_Intake_Data'[Intake_Data_Grade]
IN {
"E2",
"E3",
"E3L",
"R2",
"R3",
"R3L",
"U2",
"U3",
"U3L"
}
)
)
VAR b =
CALCULATE (
COUNT ( 'looker_views lkr_Intake_Data'[Company_Id] ),
FILTER (
'looker_views lkr_Intake_Data',
'looker_views lkr_Intake_Data'[Intake_Data_Custom_1]
IN {
"COP1",
"COP2"
}
)
)
RETURN
DIVIDE (
a,
b
)
@Anonymous ,
Here is what I have written:
@Anonymous ,
I think some syntax error.
Please use this measure.
Measure =
VAR a =
CALCULATE (
COUNT ( 'looker_views lkr_Intake_Data'[Company_Id] ),
FILTER (
'looker_views lkr_Intake_Data',
'looker_views lkr_Intake_Data'[Intake_Data_Custom_1]
IN {
"COP1",
"COP2"
}
&& 'looker_views lkr_Intake_Data'[Intake_Data_Grade]
IN {
"E2",
"E3",
"E3L",
"R2",
"R3",
"R3L",
"U2",
"U3",
"U3L"
}
)
)
VAR b =
CALCULATE (
COUNT ( 'looker_views lkr_Intake_Data'[Company_Id] ),
FILTER (
'looker_views lkr_Intake_Data',
'looker_views lkr_Intake_Data'[Intake_Data_Custom_1]
IN {
"COP1",
"COP2"
}
)
)
RETURN
DIVIDE (
a,
b
)
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
8 | |
8 |