Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Year To Max Date
04-22-2024
05:12 AM
is there a method of doing a year to max date in a fact table.
i need the year to start 01/04 and I need to calculate volumes to the max date of another dateset.
i will also need to do a same period previous year on this metric.
Solved! Go to Solution.
1 ACCEPTED SOLUTION
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024
05:52 AM

Like this:
InScope =
VAR _MaxFromFactTable = MAX( YOUR_FACT_TABLE[Date] )
RETURN
IF(
'Calendar Table'[Date] <= _MaxFromFactTable,
1,
0
)
Good luck! 🙂
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024
05:21 AM

You can add a calculated column "InScope" to you Calendar Table that will compare date of a current row with max date from forct table. Once you have it, you can make a desired calculation using this template code:
Measure1 =
VAR _CurrentlySelectedMinDate = Min( CalendarTable[Date] )
Calculate(
Your_calcuation,
CalendarTable[Date] >= _CurrentlySelectedMinDate,
CalendarTable[InScope] = 1
)
I hope it helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024
05:26 AM

how would i do the in scope calculation?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024
05:52 AM

Like this:
InScope =
VAR _MaxFromFactTable = MAX( YOUR_FACT_TABLE[Date] )
RETURN
IF(
'Calendar Table'[Date] <= _MaxFromFactTable,
1,
0
)
Good luck! 🙂

Helpful resources
Recommendations
Subject | Author | Posted | |
---|---|---|---|
08-06-2024 07:48 PM | |||
05-17-2024 12:50 AM | |||
06-13-2024 07:34 AM | |||
11-15-2023 02:51 AM | |||
Anonymous
| 05-07-2024 01:47 AM |
Featured Topics
Top Kudoed Authors (Last Month)
User | Count |
---|---|
119 | |
104 | |
83 | |
52 | |
46 |