Forum Discussion
Multiple Filters COUNTROWS - Too Few Arguments Passed
- 9 years ago
In addition to ankitpatira's solution, you should be able to create a measure to calculate the cumulative number of policies (or records) by issued date and by policy type as you mentioned above. The formulas below are for your reference.
Cuml_Pol_Count_P = CALCULATE ( IF ( ISBLANK ( COUNTROWS ( Policy ) ), 0, COUNTROWS ( Policy ) ), FILTER ( ALLSELECTED ( Policy ), Policy[ISSUED_DATE] <= MAX ( Policy[ISSUED_DATE] ) && Policy[POLICY_TYPE] = "P" ) )
Cuml_Pol_Count_S =
CALCULATE (
IF ( ISBLANK ( COUNTROWS ( Policy ) ), 0, COUNTROWS ( Policy ) ),
FILTER (
ALLSELECTED ( Policy ),
Policy[ISSUED_DATE] <= MAX ( Policy[ISSUED_DATE] )
&& Policy[POLICY_TYPE] = "S"
)
)Following is the result of the measures in report.
Regards
In addition to ankitpatira's solution, you should be able to create a measure to calculate the cumulative number of policies (or records) by issued date and by policy type as you mentioned above. The formulas below are for your reference.
Cuml_Pol_Count_P =
CALCULATE (
IF ( ISBLANK ( COUNTROWS ( Policy ) ), 0, COUNTROWS ( Policy ) ),
FILTER (
ALLSELECTED ( Policy ),
Policy[ISSUED_DATE] <= MAX ( Policy[ISSUED_DATE] )
&& Policy[POLICY_TYPE] = "P"
)
)
Cuml_Pol_Count_S =
CALCULATE (
IF ( ISBLANK ( COUNTROWS ( Policy ) ), 0, COUNTROWS ( Policy ) ),
FILTER (
ALLSELECTED ( Policy ),
Policy[ISSUED_DATE] <= MAX ( Policy[ISSUED_DATE] )
&& Policy[POLICY_TYPE] = "S"
)
)Following is the result of the measures in report.
Regards
- InsureBI9 years agoAdvocate II
Thanks to Ankitpatira and JerryLi for posting the solutions. I chose to go with Jerry's solution (and it worked!) to avoid duplicating data, but I will use Ankitpatira's solution if I find myself creating too many new measures.