Why do I see different values for a gauge in different timeframes? - metrics

I have a gauge in datadog and want to see the 'last' value.
But when I select the last day in the dashboard time-picker I see a different value than when I select the last week. My natural understanding is that 'last' gauge value should be the same regardless of how far back in time I go.
Am I missing some understanding of how gauges or datadog works?

Related

DAX ignore row context in measure. Calculate for a defined set of dates and show the value for all dates in visual

I am trying to create a measure which calculates the average daily revenue per customer, but only using days in a 6 months period prior to a specific date (where some type of conversion happens).
This specific date can be different for each customer.
The intention is to use the measure as a baseline for indexing daily average in the days/months/years after said conversion date.
If I put my current version of the measure in a card it works just fine (circled in green). But I will eventually have to visualize this over time as well. Thus I need the value to stay the same regardless of the row/date context in a table or timeline (circled in orange).
I suspect I need to use one of the ALL/ALLSELECTED/ALLEXCEPT filter modifiers but I can't really get anything to work.
The measure looks like this for now:
Average daily rev before conversion = CALCULATE (
AVERAGEX(
VALUES('Date'[Date]),
[HI & Acc Rev]
),
FILTER('poc vFact_SalesLine','poc vFact_SalesLine'[OrderDate_ID] IN DATESINPERIOD('Date'[Date],FIRSTNONBLANK('poc vDim_Customer'[DSE first conversion date],1),-6,MONTH)))
I've tried adding REMOVEFILTERS('Date'[Date]) just before the filtering of order dates, but that doesn't work. Gives me the exact same values as shown below.
All help is very welcome? Is my approach all wrong?

Fixed time range for a grafana panel

I'm using several time series panels on my dashboards, which are showing the values based on the selected time range.
Now, I want to add a gauge panel, which should show the number of payment transactions since midnight (although I know all the problems about server restarts, the feature of the rate function, etc. the gauge panel will an interesting part of my dashboard). So my query has to be independant from the selected time range of the dashboard.
I've found the variables ${__from} und ${__to} in the Grafana docs, but I'm not sure, how I can use them in a query or how to use them flexibel, e.g. getting the current daten/time as "to" and calculating "from" als midnight value.
Has anybody an idea, if this is generally possible?
Thanks in advance
Matthias

Can you remove drill through filter from measures in Power BI?

I am trying to use the drill through filter to take my user to other data related to that date. Essentially I have an overview page and I want the user to click on a date and drill through to the next page, where it will show them test scores nearest to that date.
I think I need to do two things 1) store the filter date as a variable so I can use it to find the nearest test date to the filtered date 2) create measures which ignore the filtered drill through date and can for example calculate the minimum or maximum test scores on all the tests overall.
I'm not sure if either of these options are possible but any help is greatly appreciated. TIA

How to calculate the current value of depreciated asset?

I'm aware of various depreciation formulas in google sheets, but to me it seems like non of them provide and cumulative value. So if I wanted to calculate the current value of a car bought 6 months ago, I'd have to have multiple rows calculating depreciation per month, and then I'd have to sum the depreciation over months (cells). Is there a way to put everything in one cell? Example:
https://docs.google.com/spreadsheets/d/1u3py5XG9IPBAMQXGmG0q-kyg60fxJ72Gy8C90Za1FTg
Columns A:F is working fine, but I want to be able to be able to have a list of multiple assets with todays (depriciated) value, like in columns H:P .
Any idea how I could achieve that?
Even though this is very brief, I want to record the comment that helped answer this question.
Will the VDB function work for you?
You enter:
VDB(cost, salvage, life, start_period, end_period, [factor], [no_switch]).
So Purchase Price - VDB(...) is the current asset value, after a specific period of time, of the asset's lifespan.
Specify start_period as zero, and end period as the number of years (or fractions) that have passed, and the result is the total depreciation over that time period. It defaults to give a DDB (Double Declining Balance depreciation) answer, but the rate (factor) can be modified. Hope this helps. I'm sure there are other options

Calculate Value For Dates Between

A few references:
Microsoft's documentation on DATESBETWEEN.
Somewhat similar question, though the answer and derivatives of the formula don't return the correct results.
Microsoft's documentation on TODAY
Per the above Microsoft documentation, I'm trying to get a calculation for the last three months based on today's current date in SSAS Tabular model. First, I have no idea how to use SSAS and my company doesn't provide any learning material, so I've been reading through the MSDN documentation, which may not be the place to start, so if this is wrong, I'd appreciate being told so. For instance, with C# or Ruby, I can test code in a console to see if I get the result that I want, and I don't see how I can do that in SSAS Data Tools' DAX language - this is a GUI which gives users very little power over what they can do (it took me four hours to figure out how to access a dimension's properties). I am definitely a code monkey.
I tried using the below formula (and derivatives of it) because this is what it looks like Microsoft is doing in their example:
3MonthValue:=CALCULATE(SUM([MeasureOne])/SUM([MeasureTwo]),DATESBETWEEN(DateDimension[Date],DATEADD(DateDimension[Date],-3,MONTH),TODAY()))
The result, nothing. Of course, if I run similar SQL logic, I get the right results. I also used the provided SO example, though I suspect that's not exactly what I'm trying to achieve, and only obtained blanks as answers. Given that I need to calculate a formula between a certain time frame, which in SQL would be the WHERE clause, how do I translate this into DAX? In other words, what is DAX's WHERE and if CALCULATE isn't right, what's the correct approach?
When you say it isn't working, how do you mean? The formula you are using refers to your date dimension's key as the starting date for your DATESBETWEEN function - this means if you are expecting the measure to populate a value, you'll need to be using a particular date in your pivot to establish context.
If you are trying to view the measure at design time, in the editor, there is no context so the measure wont populate.
Moreover, if in a pivot you're looking at a time context that includes more than one date, that also will not work. So say you are looking at a month, or a quarter. Both of these encompass what amount to multiple DateDimension[Date]'s - so again context cannot be established.
so to recap - measures which look at date ranges like DATESBETWEEN using a starting time context that is set to your dimensions time key will only show up in a pivot when the pivots data is filtered to a single date.
You can test this using the same function, but hard set the starting date by replacing DateDimension[Date] with a static date (or possibly TODAY()). The measure should show up in design time because the formula has all the information it needs to complete the calculation.

Resources