I have a KPI visual that shows a metric on how many documents exist in my dataset. There is a filter applied to this KPI visual, where a user can select the year and so the visual only shows the number of documents in that year. I want to pass the value of the KPI visual to a calculated field.
In the screen shot for example, year 1900 had 7 documents. How can I pass the number 7 to a calculated field in my analysis, to create more visuals from it.
@hanssaj - You can use the expression that you used in the KPI in other calculations as well. You just need to ensure that visual is also sensitive to the parameter/filter that you have in place. Hope this helps!
1 Like
Thank you for your reply. Unfortunately that doesn’t work for my use case. I do need to pass the value I see on the KPI to a calculated field to be able to use it in another visual. My other visuals being sensitive to the filter isn’t giving me the right calculations. Any other work around you can think of?
@hanssaj - I have tried to do something at my end and would like to share that with you. Let me know if this idea works for you.
Step 1 : Created a Parameter named : paramRegion and linked the corresponding control to the “Region” column if the dataset
Step 2: Created a KPI where I need to show the total no. of customers based on my Region Parameter Selection. Hence the Calculation here is : Count(Customer)
Step 3 : According to your use case you would like to use that number which is appearing in your KPI visual in another calculation, which basically culminates to using Count(Customer) within this new calculated field
Step 4: Created a Calculated field with if-else construct like below :
As you can see I am using that same calculation to evaluate this new calculated field.
Final Snapshot :
Case 1 : When KPI visual is greater than 3000
Case 2 : When KPI visual is less than 3000
Hope this helps!
1 Like