Forum Discussion
DAX: Calculate, Filter problem, dead stock calculation
- 10 years ago
Yep I agree, calculated column approach is a better design. And you can use EARLIER function for the last 8 weeks logic. Here is a link to EARLIER function (https://msdn.microsoft.com/en-us/library/ee634551.aspx)
Hope this helps.
Check out the Chicagoland Power BI User Group
mmm.
In my opinion is wrong by desing:
I'd preferred a calculated COLUMN on the Fact table that calculate the [sumSalesLast8weeks] and use a IF statement that puts a value like ACTIVE if >0 or DEAD if = 0.
isn't it better? Then u can easily filter by that column.
- nikil10 years agoResolver I
Yep I agree, calculated column approach is a better design. And you can use EARLIER function for the last 8 weeks logic. Here is a link to EARLIER function (https://msdn.microsoft.com/en-us/library/ee634551.aspx)
Hope this helps.
Check out the Chicagoland Power BI User Group
- iNekros10 years agoNew Member
thank you, its really helpful ( I knew, that I misunderstood DAX concept a little now are things much clearer too me).