Forum Discussion

bhavnat23's avatar
bhavnat23
New Member
2 years ago

power bi

ned help solving this measure 

Vin_no_count_Old_slot_date = CALCULATE(Query1[Vin_no Count], FILTER(Query1, Query1[oldest_slot_dt].[Year] < 2024))
actually I want the date to show as 01-01-2024  

 

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Query1[oldest_slot_dt] < DATE (2024,1,1)

  • v-zhangti's avatar
    v-zhangti
    Community Support

    Hi, bhavnat23 

     

    Can you provide sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures or Excel. I look forward to your response.

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Hi,

    You should first of all create a Calendar Table with calculated column formulas for Year, Month name and Month number.  Sort the Month name column by the Month number.  Create a relationship (Many to One and Single) from the Date column of yoru Data Table to the Date column of the Calendar Table.  Write this measure

    Vin_no_count_Old_slot_date = CALCULATE([Vin_no Count], Calendar[Date] < date(2024,1,1))

    I have assumed that Vin_no count is an explicit measure that you have written.