Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I have expression like this:
if(KPI='STEC', sum({<[YTD/MTD]={'YTD'}>}[Thermal energy consumption (kiln)])/sum({<[YTD/MTD]={'YTD'}>}[Clinker production volume]),
it shows me YTD data for STEC KPI for selected Year.
I need to have one more column named Previous Year YTD in my table which will show data for STEC for same period of previous year.
For Example, if I choose Year 2023 and Month Feb, in Column YTD I would like to see data for Feb 2023 and in Colum Previous Year YTD data for Feb 2022.
Thank you
Hi,
If YTD is your Date field, then can you try this ?
if(KPI='STEC', sum({<[YTD/MTD]={'YTD'},YTD={"$(=AddYears(YTD,-1))"}>}[Thermal energy consumption (kiln)])/sum({<[YTD/MTD]={'YTD'},YTD={"$(=AddYears(YTD,-1))"}>}[Clinker production volume])
Regards