Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I am trying to dynamically calculate whether each store has been opened for more than 365 days. Due to DirectQuery connection we cannot create calculated columns. So we're left to do this in a measure.
Not sure if this is even possible but here is my attempt:
_test =
VAR MinDateSelected =
FIRSTDATE ( 'Time'[Date] )
VAR DateDiff =
IF (
MIN ( Stores[DateOpened] ) > MinDateSelected,
-1,
DATEDIFF ( MIN ( Stores[DateOpened] ), MinDateSelected, DAY )
)
VAR SameStoreLogic =
IF ( ABS ( DateDiff ) > 365, "Y", "N" )
RETURN
SameStoreLogicProblem is, if I want to aggregate current year stores for only stores that meet the same store logic, I am not able to use this measure as a filter.
Solved! Go to Solution.
@Anonymous ,
FilterExpression in FILTER is a boolean (True/False) expression.
@Anonymous ,
FilterExpression in FILTER is a boolean (True/False) expression.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |