Forum Discussion
MG25
5 years agoRegular Visitor
Filter by date periods
Hi, I'm new to Power BI and I am hoping someone could help me out with what I thought would have been simple. It turns out it's not so simple if you don't know how. I have a query that has a ...
- 5 years ago
hi, MG25
You can use the measure belowmeasure = CALCULATE( COUNTROWS('Table'), DATEDIFF('Table'[Product Date of Manufacture], 'Table'[Product Return Date], DAY )<365 )best regards.
- 5 years ago
MG25
I recommend you to create a date table in your model if you don't have one and create a relationship. Add the following measure and insert a Matrix visual. I attached a sample file.Less than one year = COUNTROWS( FILTER( Table5, INT( Table5[Product Return Date] - Table5[Product Date of Manufacture] ) < 365 ) )
Portrek
Resolver III
5 years agohi, MG25
You can use the measure below
measure =
CALCULATE(
COUNTROWS('Table'),
DATEDIFF('Table'[Product Date of Manufacture],
'Table'[Product Return Date],
DAY
)<365
)
best regards.