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 ,
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
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
- BSLATTER6 years agoHelper III
Hi, thanks for all the help.
I think this has been resolved. Looks like my measure was actually built as a column. Though I thought it was built as a measure. I discovered this while building the sample data.
Going to assume that was just my mistake in selecting "new column" instead of "new measure" like I thought I did. My other calculations set up as measures are working and now my new one does as well.
Thank you for your patience!