Forum Discussion
Can Measure Result be used for Creating a Chart?
tex628 the report look good but there is still one issue as below.
I use the Sales Table to create the tables below. As you can see in the second table, when I add the Sales Trend column, the Group become splited.
We are currently categorizing every combination of dimensions as either headwing or saving on a row level basis. Using the image above as an example this means that within the group "A" there one or more rows that are considered "Headwings" as well as one moremore that are considered "Savings". Since the Headwings/Savings calculation is made before any calulation in the table is done the column acts as a category, telling you that within the specific group "A" there is a specific sales gap related to the categories.
If you're looking for a categorization that is done in the table calculation you will need to use a measure instead of a calculated column. Since the measure needs to rely on the sales gap the gap also needs to be calculated with a measure.
Sales Gap = [Sales] - [Sales 2019]Sales Trend = IF( [Sales Gap] >= 0 , "Savings" , "Headwings" )
But keep in mind that measures are dynamic and will calculate dependant on the dimensions they are evaluated with. As you are currently only using the "Group" dimension in your table, this essentially means that the sales gaps will be a comparison of the 2020 / 2019 sales for each group.
Hope this helps, let me know how it goes.
/ J
- Anonymous6 years agoNot applicable
tex628 Thanks for your insights, now I got the better idea.
I have another question. How can I formulate a Column Calculation for YTD Sales column below? The YTD Sales is based on the Country and SKU. I need your insight to create the column using Calculated Column because I prety much understand how to do it using Measure.
Country Date SKU Sales YTD Sales MY 15 Jan 2020 M001 100 100 JP 23 Jan 2020 J001 75 75 MY
20 Feb 2020 M001
120 220 (100 + 120) JP 5 Feb 2020 J001 150 225 (75 + 150) JP 12 Mar 2020 J002 125 125 MY 21 Mar 2020 M002 170 170 JP 5 Mar 2020 J002 10 135 (125 + 10)