Forum Discussion
QTD for Selected Month
Hi,
I have the QTD for Qty working and if I have a simple example with columns
Product, Year, Qtr, Month, QTD, the QTD value is correct. However, if I select any month from a slicer based on a Calendar table, Period column, say 202102 the value for QTD only includes 202102 Qty. QTD does not include 202101.
However, If I use a slicer based if the in-built Date Hierarchy that PBI builds from the Date_PK (Calendar table) and select 202102 it works.
Using the std formula : [CM] is Qty
Figured this out, to be able to use a Month, Qtr field from the Calendar table other than from the default Date Hierarchy, I used the following formula. I can now select just a single month and it will display the correct QTD for that month. So selecting Feb-21 will include Jan-21 and Feb-21 in the QTD calulation
CALCULATE('monthlyKpi2'[CM], DATESQTD('Calendar'[date_pk]) )
2 Replies
- arifsyeduk1
Helper I
Figured this out, to be able to use a Month, Qtr field from the Calendar table other than from the default Date Hierarchy, I used the following formula. I can now select just a single month and it will display the correct QTD for that month. So selecting Feb-21 will include Jan-21 and Feb-21 in the QTD calulation
CALCULATE('monthlyKpi2'[CM], DATESQTD('Calendar'[date_pk]) )- AnonymousNot applicable
Hi arifsyeduk1 ,
So you have resolved the problem by yourself? Is there anything else need help with this thread? If no, could you please mark your post as Answered? It will help the others in the community find the solution easily if they face the same problem with you. Thank you.
Best Regards