Forum Discussion

esbertl's avatar
esbertl
New Member
2 years ago
Solved

Wrong calculation using date and text filter

I have a small sample project using this csv data ("testvalues.csv") DateChanged,Value,Project 2024-01-01 00:00:00,100,Project A 2024-01-01 00:00:00,20,Project B 2024-01-10 00:00:00,-10,Project A...
  • Wilson_'s avatar
    Wilson_
    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.