Sometimes , we have to calculate total amount for rolling 12 month/rolling 3 month.
For such rolling period calculations, we can use Time intelligence function "DATESINPERIOD"
Sometimes , we have to calculate total amount for rolling 12 month/rolling 3 month.
For such rolling period calculations, we can use Time intelligence function "DATESINPERIOD"
First we need Total Sales Amount
Say there are scenarios where we want to link table & graph.
Depending on the values of table the graph value also should change.
Say in a table we have product category: Bike , cars, scooter
We want to show Bike Sales when Bike is selected in the table, when car is selected the graph should show sales of graph.
When all product category is selected, by default the chart should show car.
Then we can write an expression like
Say we have below data:
Now if we want to calculate the running total, something like below
select OrderID , OrderDate, HotelName, FoodItem, Bill_amt, sum(Bill_amt) over (order by OrderDate) from Orders
SELECTEDVALUE : Displays the value that is selected. If multiple values are selected it displays blank