The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have the following DAX:
Hello @rwong1,
Can you please try this:
VAR _FirstSelectedMonth =
CALCULATE(MIN('Date'[MonthID]), ALLSELECTED('Date'))
VAR _YearOfFirstSelectedMonth =
CALCULATE(MIN('Date'[Year]), ALLSELECTED('Date'))
VAR _PriorMonth =
IF(_FirstSelectedMonth > 1, _FirstSelectedMonth - 1, 12)
VAR _YearOfPriorMonth =
IF(_FirstSelectedMonth > 1, _YearOfFirstSelectedMonth, _YearOfFirstSelectedMonth - 1)
VAR _A =
CALCULATE (
AVERAGEX ( VALUES ( 'Date'[Mo Cal Yr] ), [Total Assets] ),
FILTER (
ALL ( 'Date' ),
'Date'[MonthID] = _PriorMonth && 'Date'[Year] = _YearOfPriorMonth
)
)
Hi Shair,
I got a syntax error. I'm not sure why.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
20 | |
18 | |
18 | |
14 | |
13 |
User | Count |
---|---|
38 | |
31 | |
22 | |
20 | |
18 |