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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi,
I have created last 12 months visual by duplicating the calendar table. Currently i have a measure with the following DAX
TravelSpend12M =
Date is from Calendar (2), no connection to any other tables.
Travel Category Detail is from fact table (Travel)
Appreciate your help in this. Thanks !
Hi,
Please try something like below whether it suits your requirement.
TravelSpend12M =
VAR _max =
MAX ( 'Calendar'[Date] )
VAR _12mth =
EOMONTH ( _max, -12 )
VAR results =
IF (
MAX ( 'Calendar (2)'[Date] ) <= _max
&& MIN ( 'Calendar (2)'[Date] ) > _12mth,
CALCULATE (
SUM ( 'Travell'[Monthly Travel Spend] ),
FILTER (
ALL ( 'Calendar'[Date], 'Calendar'[Year], 'Calendar'[Quarter & Year] ),
'Calendar'[Date] = VALUES ( 'Calendar (2)'[Date] )
)
),
BLANK ()
)
RETURN
results
Hi, thanks for replying. Unfortunately it doesn't solve the problem im still not getting any column subtotal as it remains blank
Hi @velvetine_123 ,
Can you please provide example data for the table? For a matrix does not reproduce the effect of your DAX code and implementation.
Best Regards
Yilong Zhou
they are honestly a very simple table. It looks like this :
Date | Category | Travel Spend |
31/7/2024 | Airfare | $100 |
30/6/2024 | Non-Travel | $50 |
31/5/2024 | Hotel | $100 |
30/4/2024 | Airfare | $300 |
The data model is connecting this Date to Calendar [Date]. The Calendar (2) table is an independent table with no connection.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
7 | |
4 | |
4 |