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.
Hi there,
I curently have this DAX formula that works. 🙂
DATE TYPE | DATE |
Last Close | 30/06/2024 |
Many Thanks in advance for your assistance!!!!
Solved! Go to Solution.
Hi @DDL76 ,
Please update it.
FC =
var _last_date=CALCULATE(MAX('DATES'[DATE]),FILTER(ALLSELECTED('DATES'),'DATES'[DATE TYPE]="Last Close"))
return
Calculate(sumx(Transactions,Transactions[Amount] *related(Codes[Natural Value])) ,FILTER(Transactions,Transactions[Scenario]="Actuals"&&Transactions[Date]<=_last_date ))
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Neeko Tang, Many thanks its all working as intended! 🙂
Hi @DDL76 ,
Please try this:
FC =
var _last_date=CALCULATE(MAX('Transactions'[DATE]),FILTER(ALLSELECTED('Transactions'),'Transactions'[DATE TYPE]="Last Close"))
return
Calculate(sumx(Transactions,Transactions[Amount] *related(Codes[Natural Value])) ,FILTER(Transactions,Transactions[Scenario]="Actuals"&&Transactions[Date]<=_last_date ))
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi there,
Many thanks for your help, I think we are very close! I think the problem is the data in the table "Transactions" needs to be limited to based on a date held in another table called "Dates".
So Transactions[Date] must be = to or less than DATES[DATE] where DATES[DATE TYPE] = 'Last Close'.
It might be worth noting that there is no relationsip between these tables, not sure if this causes an issue? I have included images of the tables and the error shown in the DAX formula. Many thanks again!!!
Hi @DDL76 ,
Please update it.
FC =
var _last_date=CALCULATE(MAX('DATES'[DATE]),FILTER(ALLSELECTED('DATES'),'DATES'[DATE TYPE]="Last Close"))
return
Calculate(sumx(Transactions,Transactions[Amount] *related(Codes[Natural Value])) ,FILTER(Transactions,Transactions[Scenario]="Actuals"&&Transactions[Date]<=_last_date ))
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
7 | |
7 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |