Forum Discussion
Count rows with the same date
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
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
- pawelj7955 years agoPost Prodigy
AlB
Thanks for your help.
Unfortunately, your measure is sum journals cumulatively and this isn't my case.- pawelj7955 years agoPost Prodigyup
- AlB5 years agoCommunity Champion
Ah, you want the openings and closing only on that specific date? Easy, we just need an = instead of a <= in the filtering then:
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] ) ) )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