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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Dear Expert, i need to fix my dax. its not working or getting the right value...
Requirements:
Period must be possible to change in the Report (Start and End date)
Average stock value:
- Stock value Period Begin:
o Sum (totalcost)
Filter by ValueDate (All Entries < Period start)
- Stock value Period End:
o Sum (totalcost)
Filter by ValueDate (All Entries < Period End)
For example:
Period Start = 01.01.22
Period End = 31.12.22
but the date should be consider from slicer.
I have year 2021, 2022, 2023 and corresponding value.
If I select Period Start = 01.01.22 then it will be show totalcost all year 2021<Period Start ->: sum(totalcost)
If I select Period End=12.31.22 then it will be show totalcost all year 2021 + 2022<Period End -> : sum(totalcost)
Now if i select Perido Start then it will comes an error
"A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filter expression. This is not allowed."
as well as select for Period end.
@Anonymous Can you let me know Which slicer are you use in report ?
For E.g date range Slicer Useing Your Report or not.THANK YOU!!
Not working for me, thanks
@Anonymous i Hope this helps you!THANK YOU!!
Begining Stock Value = CALCULATE([totalcost],filter(ALLSELECTED('ValueDate[Date]),'ValueDate[Date]<Period Start)))
Ending Stock Value = CALCULATE([totalcost],filter(ALLSELECTED('ValueDate[Date]),'ValueDate[Date]<Period Start)))
ELSE USE THIS
Begining Stock Value = CALCULATE([totalcost],filter('ValueDate'[Date],'ValueDate'[Date]<Period Start)))
Ending Stock Value = CALCULATE([totalcost],filter('ValueDate'[Date],'ValueDate'[Date]<Period Start)))
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 10 | |
| 9 | |
| 6 | |
| 5 | |
| 3 |