Forum Discussion
Anonymous
4 years agoNot applicable
DAX Measure
I have Project Table, some necessary columns are given below: Project Case Organization StartPeriod EndPeriod 42251 XYZ 8/27/2017 10/16/2017 I have another table Tickets, which lo...
- 4 years ago
Anonymous so as I understand, Measure1 is working as intended but Measure2 is not with the revised dataset.
Try this out
Measure2 = VAR _0 = CALCULATE ( MAX ( Project[EndPeriod] ), FILTER ( VALUES ( Project[Organization] ), Project[Organization] = CALCULATE ( MAX ( Tickets[Organization] ) ) ) ) VAR _1 = CALCULATE ( COUNT ( Tickets[Case] ), FILTER ( Tickets, Tickets[StartPeriod] > _0 && Tickets[StartPeriod] <= _0 + 30 ) ) RETURN _1
smpa01
4 years agoCommunity Champion
Anonymous so as I understand, Measure1 is working as intended but Measure2 is not with the revised dataset.
Try this out
Measure2 =
VAR _0 =
CALCULATE (
MAX ( Project[EndPeriod] ),
FILTER (
VALUES ( Project[Organization] ),
Project[Organization] = CALCULATE ( MAX ( Tickets[Organization] ) )
)
)
VAR _1 =
CALCULATE (
COUNT ( Tickets[Case] ),
FILTER ( Tickets, Tickets[StartPeriod] > _0 && Tickets[StartPeriod] <= _0 + 30 )
)
RETURN
_1
Anonymous
4 years agoNot applicable
smpa01 This worked well! Thanks
Instead of Count I just used Distinctcount, as there were duplicates in my data. Just wanted to update if anyone refers to this solution.