KPI with dynamic texts
Hello,
I am trying to add a dynamic text to the KPI which shows a Year-over-Year change in between the quarters in my presentation.
However, the text only returns a result if all years, available in the presentation filter, are selected, which obviously make no sense. I also tried to remove the "Date years" and "Date quarter" rows from the table, but then it is only possible to select the "Cost" column in the formula, which misses the point of the dynamic text.
Here I add a code and print screens of the settings.
if(data(4,2) >= 0, fontformat("Yoy Δ: " +(formatteddata(4,2)), "Green"), fontformat("Yoy Δ: " +(formatteddata(4,2)), "Red"))
Do you have any experience with a similar solution? Do I have to use formulate instead of calculations in discover?
Thank you!
4 replies
-
Hi Jan,
At first glance, it looks like you are using context calculations within the Discover. To your question - yes I would use formulate to calculate things like YoY % in most cases. Having a Date Hierarchy on your Model will also allow you to use Current Member and Parallel Periods to get those Year comparisons for Time Calculations.
One thing to consider is that if you are using that Discover elsewhere in the Dashboard you may run into slicers interacting with that visual. That appears to be what is happening - is that the case? One way to avoid that would be to have separate Discovers that are used just for Illustrate. That way those won't run the risk of them being sliced in the Present, and you are just referencing the values you'll want in your dynamic text formula.
Hope that helps!