power bi data
2 TopicsUse values of variables to filter data
Hello, I have 2 variable like as bellow : Var1 = SUMMARIZE( ORDDTS, ORDDTS[ID_CUSTOMER] , "MINORDER",MIN(ORDDTS[ID_ORDERDATE]) ) Var2 = SUMMARIZE( ORDDTS, ORDDTS[ID_CUSTOMER] , "MAXORDER",MAX(ORDDTS[ID_ORDERDATE]) ) I want to filter the customer who have MaxOrder-MinOrder>100 i did the code as bellow but doesn't work CALCULATE(NATURALINNERJOIN(var1, var2), VALUES('var1'[MINORDER]) - VALUES('var2'[MAXORDER])>100) Any idea how can i do that ? Thanks for help !Solved641Views0likes3CommentsAverage Last 6 months accumulated
Hello dear community, I come to you so that you can help me with this DAX calculation. I need a Calculated Column to show me: the average of the last 6 months accumulated for each collaborator (in case the collaborator appears> = 6 times in the year); or in the event that the employee in the current year period appears less than 6 months, showing the average based on the number of months that the employee has been in the company in the current period, for example: Year Filter: 2021 Current month: May2021 (5) Seniority of the collaborator to May2021: 3 months (that is, the collaborator appears 3 times until May, if in June it becomes active, the collaborator when we are in June then it will appear 4 times, and so on) So the average will be = (Mar + Apr + May) / 3 Also consider that I already have a calendar table in my Power BI. Here I have an example sample of what I want exactly (column "Average Last 6 months), you can download the file here: I also leave the extract here: I read them, I hope they can help me as soon as possible. and thank you very much in advance. Nestor ReyesSolved7.8KViews0likes2Comments