Skip to main content

I have below metric for selecting the last month of the year.

I’m using it as a dynamic variable for Month dimension.

I want to use it for YoY% (“Selected Year” vs. Previous Year) headcount variance.

 

But it doesn’t work.

 

How do I make this work? Or, how do I make a similar logic to calculate it for the Year (property of Month) selected from the Pages (being dynamic)?

Currently, I’m calculating it for a specific Year (unlinked from the Pages in the main board) like below.

 

P.S. The variable works well in Filter.

 

Hi ​@haseebsahaak ,

 

Marty here from Pigment Product Support. Thanks for your patience. 

The reason your YoY Calculated Item isn’t returning a result is that the metric your dynamic variable is based on (Set_Var_Last_Month_of_Year) is showing multiple boolean selections (one for the last month of each available year) and Calculated Items require a single selection in order to calculate. 

That being the case, we recommend making a new metric that will show both the last month of year (Dec), as well as select the current year. Something like:

MONTH(Month.'Start Date')=12 AND Month.'Start Date'> DATE(2024,12,31)

That way the boolean will return only a single selection and the YoY can be calculated. 


Let me know if you have any questions or need any further assistance. 

 

Cheers,
Marty


Hi ​@Marty Leonard,

 

Thank you for the comment!

 

Selecting the current year manually is what I have kind of done currently in the calculated item. What I want is the calculation being dynamic, in the sense that it will calculate the variance based on the year chosen in the Pages.

 

Can I create a boolean metric for Month that gives me TRUE for the Month.Year selected in the Pages? Or, can the boolean metric restriction be removed from the dynamic variables? Maybe I could choose a dimension (Month or Month.Year) instead.

 

Regards,

Haseeb

 

 


Reply