Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Select Conversion=IF(ISBLANK(CALCULATE(DIVIDE(COUNTX(FILTER('CUSTOMER Lookup',[Type]="MEMBER"),[CUSTid])
,CALCULATE([CUSTid],all(Customer))),0,CALCULATE(DIVIDE(COUNTX(FILTER('CUSTOMER Lookup',[Type]="MEMBER"),[CUSTid])
,CALCULATE([CUSTid],all(Customer))))
Solved! Go to Solution.
Try like
Select Conversion=IF(ISBLANK(CALCULATE(DIVIDE(COUNTX(FILTER('CUSTOMER Lookup',[Type]="MEMBER"),[CUSTid])
,CALCULATE([CUSTid],all(Customer))))),0,CALCULATE(DIVIDE(COUNTX(FILTER('CUSTOMER Lookup',[Type]="MEMBER"),[CUSTid])
,CALCULATE([CUSTid],all(Customer)))))
Hi @San1979 ,
Three right parenthesis were missing in your formula, please see the red mark in the formula below:
Select Conversion=IF(ISBLANK(CALCULATE(DIVIDE(COUNTX(FILTER('CUSTOMER Lookup',[Type]="MEMBER"),[CUSTid]) ,CALCULATE([CUSTid],all(Customer))) )) , 0, CALCULATE(DIVIDE(COUNTX(FILTER('CUSTOMER Lookup',[Type]="MEMBER"),[CUSTid]) ,CALCULATE([CUSTid],all(Customer)))) ) |
In addition, your formula looks a bit messy. In fact, you can organize your formula with the help of DAX formatting tool. And if the formula has any error, it will be easier and faster to find the cause after formatted.
Best Regards
Rena
Hi @San1979 ,
Three right parenthesis were missing in your formula, please see the red mark in the formula below:
Select Conversion=IF(ISBLANK(CALCULATE(DIVIDE(COUNTX(FILTER('CUSTOMER Lookup',[Type]="MEMBER"),[CUSTid]) ,CALCULATE([CUSTid],all(Customer))) )) , 0, CALCULATE(DIVIDE(COUNTX(FILTER('CUSTOMER Lookup',[Type]="MEMBER"),[CUSTid]) ,CALCULATE([CUSTid],all(Customer)))) ) |
In addition, your formula looks a bit messy. In fact, you can organize your formula with the help of DAX formatting tool. And if the formula has any error, it will be easier and faster to find the cause after formatted.
Best Regards
Rena
Hi @Anonymous ,
Three right parenthesis were missing in your formula, please see the red mark in the formula below:
Select Conversion=IF(ISBLANK(CALCULATE(DIVIDE(COUNTX(FILTER('CUSTOMER Lookup',[Type]="MEMBER"),[CUSTid]) ,CALCULATE([CUSTid],all(Customer))) )) , 0, CALCULATE(DIVIDE(COUNTX(FILTER('CUSTOMER Lookup',[Type]="MEMBER"),[CUSTid]) ,CALCULATE([CUSTid],all(Customer)))) ) |
In addition, your formula looks a bit messy. In fact, you can organize your formula with the help of DAX formatting tool. And if the formula has any error, it will be easier and faster to find the cause after formatted.
Best Regards
Rena
Yeah, that code is a mess. Always format your code properly to avoid this kind of thing. This is what I think you were going for:
Select Conversion=
IF(
ISBLANK(
CALCULATE(
DIVIDE(
COUNTX(
FILTER(
'CUSTOMER Lookup',
[Type]="MEMBER"
),
[CUSTid]
),
CALCULATE([CUSTid],all(Customer))
)
)
),
0, //True statement
CALCULATE(
DIVIDE(
COUNTX(
FILTER(
'CUSTOMER Lookup',
[Type]="MEMBER"
),
[CUSTid]
),
CALCULATE([CUSTid],all(Customer))
)
) //False statement
)
Also, here is a much, much better way to write that code:
Select Conversion=
VAR __Calculation =
CALCULATE(
DIVIDE(
COUNTX(
FILTER(
'CUSTOMER Lookup',
[Type]="MEMBER"
),
[CUSTid]
),
CALCULATE([CUSTid],all(Customer))
)
)
RETURN
IF(ISBLANK(__Calculation),0,__Calculation)
Try like
Select Conversion=IF(ISBLANK(CALCULATE(DIVIDE(COUNTX(FILTER('CUSTOMER Lookup',[Type]="MEMBER"),[CUSTid])
,CALCULATE([CUSTid],all(Customer))))),0,CALCULATE(DIVIDE(COUNTX(FILTER('CUSTOMER Lookup',[Type]="MEMBER"),[CUSTid])
,CALCULATE([CUSTid],all(Customer)))))
User | Count |
---|---|
77 | |
74 | |
63 | |
61 | |
45 |
User | Count |
---|---|
108 | |
102 | |
93 | |
83 | |
64 |