question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New "prior" secondary calculation

See original GitHub issue

To ease period over period reporting in some BI tools, an additional secondary calculation could be added.

Example usage:

{{ metrics.metric(
    metric_name='sessions',
    grain='day',
    dimensions=[],
    secondary_calculations=[
        metrics.period_over_period(comparison_strategy="prior", interval=7, alias="sessions_7_days_ago"),
    ],
) }}

This would perform no actual calculation but pull the metric value from the correct interval.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
callum-mcdatacommented, Jun 29, 2022

Sweet! Let me know if you run into any issues and I’m happy to help point you in the right direction. Also a heads up we’re working on a pretty significant overhaul of the package (v0.3.0) in #37 so if you get this over the line before we merge that I’d just convert your integration tests into the new datasets there.

0reactions
Aylrcommented, Oct 11, 2022

How exciting!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Table Calculation Types
Previous, Calculates the difference between the current value and the previous ... For an example showing how to create a secondary calculation, see...
Read more >
when using Table Calculations in Tableau - YouTube
This Video helps to solve the following questions:-What is the yearly running total of revenue for Product Sub-Category ?
Read more >
Tableau Table Calculation Highlights: Types of Calcs
The second calculation compares the previous cell value to the current one to calculate the difference across the whole table.
Read more >
Maximum VA Guaranty Calculation
The borrower used $70,000 of entitlement on a prior VA-guaranteed home loan (not restored). The Veteran is seeking to purchase another home with ......
Read more >
Add a secondary table calculation - Tableau Video Tutorial
[Instructor] In the previous movie, I showed you how to create running total and running average table calculations, among others.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found