-
Case statement with two conditions
Hey! I have a case statement below for inventory to create a pie graph. Case WHEN `AVAILABLE_COUNT` <= 20 THEN 'Out of Stock' WHEN `AVAILABLE_COUNT` >= 40 THEN 'Sufficient Stock' Else 'Low levels' End The only problem is that I have 2 warehouses I included as filters. However, when the data populates it separates the two…
-
Beast Mode - UTC to Mountain Time
Hey! I need help with doing a beast mode calculation. I have 'Date SO Created" and it has UTC time zone, which I need to convert to Mountain Time. The data is shown as "6/4/2018 2:41:00 AM" I heard about CONVERT_TZ and I have tried plugging it in myself, but nothing is validated. Thank you!
-
Case When
This is confusing to me. I am used to If, then statements. Could someone tell me the error when using this statement. The idea is when the discount level is 0 I want to divide it by 64, if it is not 0 then I want to divide by 24. This is what I have. CASE WHEN `Discount`=0 then `Quantity`/ 64 else `Quantity` / 24 Thanks!
-
Calculation for Growth YOY
Hey! I need help figuring out a calculation for growth YOY. I have a dataflow that streams in total sales, which I created a bar graph for YOY comparison for each month. From my data set, I am pulling in from a third party, each line has a date and amount in sales. I want to see growth from Jan 2018 to Jan 2017 as well as…
-
Group Bar Graph - Showing number of occurence
So in my data, I have credits, revenue, & credits with revenue at different discount levels. These data show the average revenue that I made at different discount levels. I had a promotion where 5% discount was used 10 times, 10% used 20 times, 15% used 3 times through a year. How do I show on the bar graph the number of…
-
100% Stack Bar
Hey, I am using the 100% Stack Bar graph and I have sales broken down to different category. How do you show % to sales. I can see the total volume for each bar, but not the percent. I want to display both. Thanks!
-
Margin Calculation
I am trying to calculate the average margin. I have two columns: margin for the item and units sold. For example: If i sold 50 units at 30% margins and 2 units at 50% margin, my average margin would be roughly 31% I need to do a summation of total units and total margin % If I do not have the summation my average margins…