Forum Discussion
To count a date column and populate the count based on main date column
Hi guru,
I would like to seek your help on the following question I encountered.
Background -
I have two tables, one being the main table (Append1) and another is the intelligient date table (Intel_cal) and their relationship is the File_Extraction_Date in Append1 table link to Date column in Intel_Cal table.
The following are the tables columns structure
Objective -
My goal is to count the "Date_Created" column based on its Date value. The result of the count of the date value in the "Date_Created" column is to populated it into the main date (i.e., Month Year Short field column in the table visual), like the following...
However, the following two DAXs I wrote gave me an incorrect outcome.
Hope you can provide an insight? and am wondering if DAX able to give me the output I want.
Thanks.
Aiyo
Hello Anningco
Try this measure
Created Count =
CALCULATE(
COUNTROWS(Append1),
FILTER(
ALL(Append1),
FORMAT(Append1[Date_Created], "MMM-yy") = FORMAT(MAX(Intel_Cal[Date]), "MMM-yy")
)
)
Thanks
If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.
1 Reply
- pankajnamekar25
Super User
Hello Anningco
Try this measure
Created Count =
CALCULATE(
COUNTROWS(Append1),
FILTER(
ALL(Append1),
FORMAT(Append1[Date_Created], "MMM-yy") = FORMAT(MAX(Intel_Cal[Date]), "MMM-yy")
)
)
Thanks
If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.