Forum Discussion
Wrong calculation using date and text filter
- 2 years ago
Hi esbertl,
The references to a date column in your measure should now reference the new date dimension table. 🙂
ValueOnDate = CALCULATE ( SUM ( testvalues[Value] ), FILTER ( ALL ( 'Calendar'[Date] ), 'Calendar'[Date] <= MAX ( 'Calendar'[Date] ) ) )
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)P.S. Need a more in-depth consultation for your Power BI data modeling or DAX issues? Feel free to hire me on Upwork or DM me directly on here! I would love to clear up your Power BI headaches.
Hi esbertl,
I strongly encourage you to build out a separate date table instead of having just one data table. Your problem goes away if you do.
Doing so is a best practice and you're seeing one of the reasons why. You can sometimes have unintended filtering side effects otherwise.
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)
P.S. Need a more in-depth consultation for your Power BI issue? Feel free to hire me on Upwork or DM me directly on here! I would love to clear up your Power BI headaches.