Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I am new to the wqorld of DAX and Power BI...
I have created the following 2 measures but they dont work...
Solved! Go to Solution.
@DDL1976 The former isn't working due to a mechanism know as "Context Transition", pretty sophisticated thing but you will get a hang of it soon.
For now write your code like this:
AC =
VAR CurrentFinancialYear = [CFY]
VAR DateFilter =
FILTER ( DimPeriod, DimPeriod[Financial Year] = CurrentFinancialYear )
VAR Result =
CALCULATE ( SUM ( FactTransactionLine[Value] ), DateFilter )
RETURN
Result
And once you are comfortable with DAX write it like this:
AC =
VAR CurrentFinancialYear = [CFY]
VAR Result =
CALCULATE (
SUM ( FactTransactionLine[Value] ),
KEEPFILTERS ( DimPeriod[Financial Year] = CurrentFinancialYear )
)
RETURN
Result
Thats amazing thank you!
@DDL1976 The former isn't working due to a mechanism know as "Context Transition", pretty sophisticated thing but you will get a hang of it soon.
For now write your code like this:
AC =
VAR CurrentFinancialYear = [CFY]
VAR DateFilter =
FILTER ( DimPeriod, DimPeriod[Financial Year] = CurrentFinancialYear )
VAR Result =
CALCULATE ( SUM ( FactTransactionLine[Value] ), DateFilter )
RETURN
Result
And once you are comfortable with DAX write it like this:
AC =
VAR CurrentFinancialYear = [CFY]
VAR Result =
CALCULATE (
SUM ( FactTransactionLine[Value] ),
KEEPFILTERS ( DimPeriod[Financial Year] = CurrentFinancialYear )
)
RETURN
Result
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
23 | |
10 | |
10 | |
9 | |
7 |