Forum Discussion
Performance issue with a DAX formula
- 4 years ago
Hello,
The solution in itself is not correct, because your FILTER argument is not 1 expression and it creates an error.
Nevertheless, based on your idea, the following formula seems to work at least better :
+Diff_Time (days_ooo) =VAR daysooo =FILTER(_TimeTable,_TimeTable[OpenDaysFR] = 0 &&_TimeTable[Date] >= DATE(YEAR(HISTORY[+Prev History_ChgDate per request]),MONTH(HISTORY[+Prev History_ChgDate per request]),DAY(HISTORY[+Prev History_ChgDate per request])) &&_TimeTable[Date] <= DATE(YEAR(HISTORY[CHANGED_DATE]),MONTH(HISTORY[CHANGED_DATE]),DAY(HISTORY[CHANGED_DATE])))RETURNIF(HISTORY[EVENT_ID] = 50,COUNTROWS(daysooo),BLANK())Kr,Elorian
No, not on a report... I want a calculated column with that number of non working day for all tickets with event-id 50, but with the size of tables I mentionned in my initial post. The formula I'm using (see post) is working, but apparently it ruins the performance of Power BI afterwards --> want to know if my formula is 1) correct and 2) can be improved to not kill performances
Hi again Elorien
You can create this measure.
Then create a table visual with ticket id and the measure. Then apply a filter for event-id = 50. It should run quickly ...