Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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)))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.