Forum Discussion
Creating a YTD
- Anonymous6 years ago
HI BSLATTER ,
If you want to achieve specific filter effect in your formula, I'd like to suggest you use ALL function to ignore filter effect on your table and DATE function to manually filter on that table records.
Time Intelligence "The Hard Way" (TITHW)
Regards,
Xiaoxin Sheng
HI BSLATTER ,
If you want to achieve specific filter effect in your formula, I'd like to suggest you use ALL function to ignore filter effect on your table and DATE function to manually filter on that table records.
Time Intelligence "The Hard Way" (TITHW)
Regards,
Xiaoxin Sheng
Thanks Anonymous - this helped a lot.
I created three calculations:
Responded YTD =
Total Surveys YTD =
CALCULATE([Total Surveys], FILTER(ALL ( 'Calendar' ), 'Calendar'[Period] <= MAX('Calendar'[Period])))
These two work great but when I try:
Response Rate YTD =
- Anonymous6 years agoNot applicable
HI BSLATTER ,
Please add all functions on SurveyData table, if you add to the calendar table, it will also work on max(Calendar[Date]) so it can only get the static value. (logic: looping whole survey data records to find out records who less than or equal to current calendar date)
Responded YTD = CALCULATE([Responded], FILTER(ALL ( 'SurveyData' ), 'SurveyData'[Date] <= MAX('Calendar'[Date]))) Total Surveys YTD = CALCULATE([Total Surveys], FILTER(ALL ( 'SurveyData' ), 'SurveyData'[Date] <= MAX('Calendar'[Date])))Regards,
Xiaoxin Sheng
- BSLATTER6 years agoHelper III
Thank you Anonymous for the tip, I've attempted these calculations.
They do provide the correct results. IE: 35 responded out of 38 total for period 2 YTD, a summation of P1 (10 and 11) and P2 (25 and 27). This so far is the same as my original calculations.
Now when I attempt to do
Response Rate YTD = DIVIDE([Responded YTD],[Completed Surveys YTD],0)
I get the same issue I've been having, where it just returns the number of Responded for the current period I've selected when I put it in a row card. Any idea what I'm doing wrong?
- Anonymous6 years agoNot applicable
HI BSLATTER ,
I think it may be related to filter conflict, can you please provide pbix file with some dummy data for a further test?
Managing “all” functions in DAX: ALL, ALLSELECTED, ALLNOBLANKROW, ALLEXCEPT
Regards,Xiaoxin Sheng