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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
I have 1 Fact table and 1 Date table. I would like 2 new metrics.
Earliest week of =
Latest week of =
Both metrics should be based on the orders in the Fact table, not the Date table. I'm still learning.
Thanks
Solved! Go to Solution.
Try these measures:
Earliest Week Of =
VAR vMinFactDate =
CALCULATE ( MIN ( 'FACT'[DATE] ), ALL ( 'FACT' ) )
VAR vTable =
FILTER ( ALL ( 'DATE' ), 'DATE'[DATE] = vMinFactDate )
VAR vResult =
MAXX ( vTable, 'DATE'[WEEK OF] )
RETURN
vResultLatest Week Of =
VAR vMaxFactDate =
CALCULATE ( MAX ( 'FACT'[DATE] ), ALL ( 'FACT' ) )
VAR vTable =
FILTER ( ALL ( 'DATE' ), 'DATE'[DATE] = vMaxFactDate )
VAR vResult =
MAXX ( vTable, 'DATE'[WEEK OF] )
RETURN
vResult
Proud to be a Super User!
Try these measures:
Earliest Week Of =
VAR vMinFactDate =
CALCULATE ( MIN ( 'FACT'[DATE] ), ALL ( 'FACT' ) )
VAR vTable =
FILTER ( ALL ( 'DATE' ), 'DATE'[DATE] = vMinFactDate )
VAR vResult =
MAXX ( vTable, 'DATE'[WEEK OF] )
RETURN
vResultLatest Week Of =
VAR vMaxFactDate =
CALCULATE ( MAX ( 'FACT'[DATE] ), ALL ( 'FACT' ) )
VAR vTable =
FILTER ( ALL ( 'DATE' ), 'DATE'[DATE] = vMaxFactDate )
VAR vResult =
MAXX ( vTable, 'DATE'[WEEK OF] )
RETURN
vResult
Proud to be a Super User!
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 62 | |
| 53 | |
| 42 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 122 | |
| 104 | |
| 45 | |
| 31 | |
| 24 |