Forum Discussion
Graph multiple measure that use different dates???
- 9 years ago
Thank you for your assistance. The formula you provided didn't work for me. However, I was able to find a soltuion. I created an inactive relationships for the date fields in my fact table not currently connected to the date table. I wrote the measures that I needed and then wrote another measure using =USERELATIONSHIP. Worked like a charm
Hi erhodes,
Based on your description, you want to let the measure work on each row, right?
If it is a case, you can refer to below code:
Test table:
# of Completed Tickets =
var temp= Calculate(Countrows(TestTable),FILTER(ALL(TestTable),COUNTX(FILTER(TestTable, [Status]="Complete"&& MONTH( TestTable[Date Created])=MONTH( EARLIER(TestTable[Date Finished]))),TestTable[Date Finished])))
return
if(temp>0,temp,0)
# of Tickets Created =
var temp= Calculate(Countrows(TestTable),FILTER(ALL(TestTable),COUNTX(FILTER(TestTable, MONTH( TestTable[Date Created])=MONTH( EARLIER(TestTable[Date Created]))),TestTable[Date Created])))
return
if(temp>0,temp,0)
Result:
Notice: ‘# of Tickets Created’ measure displays the total tickets created in the same month.
Regards,
Xiaoxin Sheng
Thank you for your assistance. The formula you provided didn't work for me. However, I was able to find a soltuion. I created an inactive relationships for the date fields in my fact table not currently connected to the date table. I wrote the measures that I needed and then wrote another measure using =USERELATIONSHIP. Worked like a charm