cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Naming for Field

Naruto
Cosmonaut

How to set the column name to be dynamic in Incorta.

Ex: I want the listing insight to show 2022,2021,2020(Last 3 Years) which should be dyanmic , when its next year it would 2023,2022,2021 is ther a way to set it at Lisitng Insight level, I don't want to use Pivot Visualization.

4 REPLIES 4

LayeredDelay
Employee
Employee

@Naruto I think you are saying you want to show the last 3 years based on a year that you pick? You can do something like that using Presentation Variables. 

Step 1: Create a Presentation Variable

Screen Shot 2022-05-18 at 9.52.30 AM.png

Step 2: Create your Insight and add the amount field three times and apply a filter to each one to filter for the year you want 

Screen Shot 2022-05-18 at 9.54.33 AM.png

Step 3: You can now experience the values changing when you pick a different date

Screen Shot 2022-05-18 at 9.52.51 AM.png

Hopefully this is clear, if not I can try and make a video to help you. 

Hi @LayeredDelay @Naruto I have similar issue here. I tried using the Presentation Variable and it will show the value selected in the insight Title. But if we have to show the Previous/Succeeding Year comparison with respect to the selected Presentation Variable, It is not possible. 

nikhil_cr_0-1681292614464.png

I mean to ask - is there a possibility to perform basic calculation on the insight field using Presentation Variable? (Example Presentation Variable - 1) which will show the Prior Year. 

Naruto
Cosmonaut

Hi @LayeredDelay ,

You're understanding is correct regarding my requirement.

If i have to show last 5 years of data do i need to create 5 P.Variables and pull into dashboard, is there any other way like creating a single presentation variable and pulling the same field to tray 5 times and applying calculations to show LY,LLY,LLLY.

EX: # $$MyDate  --> 2022

# $$MyDate-1  -->2021

# $$MyDate-2  --> 2020

marcpaige
Astronaut

I had a similar situation I think, I needed to show monthly aggregates with difference an variance. I used session variables to hold the months. For example, I have session variables called twoMonthsAgoMonthName, lastMonthName, and currentMonthName. These are used in my labels and insight title. I have corresponding session variables where needed (e.g. twoMonthsAgoStartDate) for the dates used in the formulas.

The dashboard is perpetual since the session variables are based on the current date.

One thing to note, session variables are strings. A session variable that creates a date has to be converted to a date for comparison or calculation.

Here is the code for the twoMonthsAgoStartDate:

 

queryDistinct(
    formatDate(
        Date_Time.Date.Month_Start_date, 
        "yyyy-MM-dd"
    ), 
    Date_Time.Date.Date = addMonths(
        $currentDate, 
        -2
    )
)
 
Conversion in a formula:
date($twoMonthsAgoStartDate)
 
I hope this gives you another option.