             1)
         "[from to[ should not exceed one year")))
 
+(defn error-helper-msg
+  [explaining-values]
+  (str "values: \n"
+       (with-out-str (pprint explaining-values))))
+
 (defn- test-cardinality
   "test one field cardinality, examples are already created."
   [examples entity field]
   (testing (format "cardinality %s %s" entity field)
-    (let [expected (-> (normalized-values examples field)
-                       set
-                       count)
+    (let [unique-values (set (normalized-values examples field))
+          expected (count unique-values)
           _ (assert (pos? expected))
           {{:keys [from to]} :filters
            :as res} (cardinality entity


(defn- normalized-values
  [examples field]
  (let [values (get-values examples field)
        flattened (cond-> values
                    (coll? (first values)) flatten-list-values)]
    (map #(cond-> % (string? %) string/lower-case)
         flattened)))

(defn- check-from-to
  [from-str to-str]

      (is (= expected
             (->> (parse-field field)
                  (get-in (:data res))
                  (map :value)))
          (error-helper-msg prepared))
      (check-from-to from to))))

(defn- to-granularity-first-day
