Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Solved! Go to Solution.
Thanks for the reply from AllisonKennedy, please allow me to provide another insight.
Hi @Ajibao03 ,
I am not sure how your semantic model is designed, here is my sample.
The SalesTable and the DisconnectedTable are as follows.
Then use the following measure to calculate Total YTD Sales revenue.
TotalYTD =
VAR _tb =
DATESBETWEEN (
'SalesTable'[Date],
MINX ( ALL ( 'Disconnected Table' ), 'Disconnected Table'[Date] ),
MAX ( 'Disconnected Table'[Date] )
)
RETURN
TOTALYTD ( SUM ( SalesTable[Amount] ), _tb )
The final result is as follows.
Please see the attached pbix for reference.
Best Regards,
Dengliang Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the reply from AllisonKennedy, please allow me to provide another insight.
Hi @Ajibao03 ,
I am not sure how your semantic model is designed, here is my sample.
The SalesTable and the DisconnectedTable are as follows.
Then use the following measure to calculate Total YTD Sales revenue.
TotalYTD =
VAR _tb =
DATESBETWEEN (
'SalesTable'[Date],
MINX ( ALL ( 'Disconnected Table' ), 'Disconnected Table'[Date] ),
MAX ( 'Disconnected Table'[Date] )
)
RETURN
TOTALYTD ( SUM ( SalesTable[Amount] ), _tb )
The final result is as follows.
Please see the attached pbix for reference.
Best Regards,
Dengliang Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Variables are calculated where they are DEFINED. They are NOT calculated where they are called / used. So in your formula, the SYTDx is calculated in the default evaulation context of your visual you're using this measure in. The CALCULATE statement you're using isn't doing anything therefore.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
146 | |
87 | |
66 | |
52 | |
46 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |