Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Need Urgent Help Please

I am new to Dax and I need help please.

I have a table with Customer ID, and name etc  

The table has a column called Contact Dates in DD/MM/YYYY format

and another column called Required Number of contacts.

 

There is a required number of visits that must be made to each customer and reported as timely or not timely.

IF the distinct count of visit => the required number of visits it qualifies as Timely, vice versa.

 

I have been able to create a measure using this DAX FORMULA 

Timeliness Criteria = IF(ISBLANK([Measure Nos of required Contact]),"",IF([Distinct Contact Date]>=[Measure Nos of required Contact],"Timely","Not Timely"))
 
I can also use the measure as a Slicer  using this Dax Formula
Timelensess Filter Status =
VAR CurrentSelection = SELECTEDVALUE(Timeliness[Criteria])
VAR CurrentCriteria = [Timeliness Criteria]
RETURN
SWITCH(
TRUE(),
CurrentSelection = "Timely" && CurrentCriteria = "Timely",1,
CurrentSelection = "Not Timely" && CurrentCriteria = "Not Timely",1,
CurrentSelection = "All",1,
 
0
 
However I am unable to create a card visual that will work with the slicer .
 
                                                            

 

For example the table visual above has 5 records based on the selected slicers, but returns 6 records when  I convert it into a card visual and applying countdistinct on the child id.

 

Please I need help as to how I can create a card visual that will return the same number of records as displayed on the tablke  with the slicers selected

     

 

        

 

1 Reply