Forum Discussion

EndriuBlack's avatar
EndriuBlack
Frequent Visitor
3 years ago
Solved

Datediff function doesn't "see" datas from fact table

Hello, I'm using Power Bi Desktop Report Server version from may 2022.   I'm trying to use DATEDIFF function to calculate days between two dates. Unfortunately when I want to use as argument a dat...
  • vojtechsima's avatar
    3 years ago

    Hi, EndriuBlack ,
    For measures, there's not row context. So you cannot use directly the columns, you need to aggreagate your data so some aggregation fucntion such as MAX. IF you wrap it to MAX, then you can use the column.
    Since measures are calculated only based on current filter context, you don't have access to rows context.

    You can also use X function to retrieve that row context and access the rows (MAXX).