Forum Discussion
pawelj795
5 years agoPost Prodigy
Count rows with the same date
Hi, I have data like below. Now, I want to count how many journals were closed and how many journals were opened on a particular date. How to do this? Sample file: https://drive.google...
amitchandak
5 years agoSuper User
pawelj795 , Refer to my blog on a similar topic. You need to create a date table and join both dates to it. Active/inactive relation will be created. You can use userelation to activate one
- pawelj7955 years agoPost Prodigy
amitchandak
I've done everything you wrote in your article, but it still doesn't work.
Could you tell me what's wrong?
Below my file:
https://drive.google.com/file/d/1cZWBHS07cqX62m_6vnR5X--Op0QceGyT/view?usp=sharing- AlB5 years agoCommunity Champion
Hi pawelj795 Get rid of the relationships and create these measures:
Count of Closed Journals V2 = CALCULATE ( DISTINCTCOUNT ( Sheet1[Journal number] ), FILTER ( ALL ( Sheet1[Closed Date] ), Sheet1[Closed Date] <= MAX ( 'Date'[Date] ) && NOT ISBLANK ( Sheet1[Closed Date] ) ) )Count of created Journals V2 = CALCULATE ( DISTINCTCOUNT ( Sheet1[Journal number] ), FILTER ( ALL ( Sheet1[Created date] ), Sheet1[Created date] <= MAX ( 'Date'[Date] ) ) )See it all at work in the attached file.
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers