Forum Discussion
vvv
3 years agoNew Member
PowerBI Table and Chart
Hi, Below is my sample data and result needed, i am trying in calculated column but its giving count for each month , but not like i am expecting the result set. Please help me with the DAX or Ca...
tamerj1
Community Champion
3 years agoHi vvv
you have to have a Date table minimum with Date and Year Month columns. The you can use
Count =
SUMX (
VALUES ( 'Date'[Year Month] ),
CALCULATE (
VAR MaxDate =
MAX ( 'Date'[Date] )
VAR MinDate =
MIN ( 'Date'[Date] )
RETURN
COUNTROWS (
FILTER ( 'Table', 'Table'[StartDate] <= MaxDate && 'Table'[EndDate] >= MinDate )
)
)
)