Forum Discussion
Need help to count periods with the same data
- Anonymous3 years ago
hI JAJ09 ,
I have created a simple sample, please refer to my pbix file to see if it helps you.
Create a measure.
MEASURE = VAR _date = CALCULATE ( MAX ( 'Table'[period] ), FILTER ( ALL ('Table' ), 'Table'[Type] <> "V" && 'Table'[period] <= SELECTEDVALUE('Table'[period]) )) VAR _times = CALCULATE ( COUNTROWS ('Table'), FILTER ( ALL ( 'Table' ), 'Table'[period] <= SELECTEDVALUE('Table'[period]) &&'Table'[period] > _date ) ) + 0 RETURN _timesHow to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ RongtieIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hI JAJ09 ,
I have created a simple sample, please refer to my pbix file to see if it helps you.
Create a measure.
MEASURE =
VAR _date =
CALCULATE (
MAX ( 'Table'[period] ),
FILTER (
ALL ('Table' ),
'Table'[Type] <> "V"
&& 'Table'[period] <= SELECTEDVALUE('Table'[period])
))
VAR _times =
CALCULATE (
COUNTROWS ('Table'),
FILTER (
ALL ( 'Table' ),
'Table'[period] <= SELECTEDVALUE('Table'[period])
&&'Table'[period] > _date
)
) + 0
RETURN
_times
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.