DAX Function for 'Customers also bought' - ssas

My Power BI dashboard contains a product filter and I would need to create a Power BI chart to show 'Customers who bought this product also bought the following ...'. Which would be a bar chart of the products by Price.
My data is flattened, consisting of an Orders table with the following:
Customer, Product, Price, Qty, Date.
Need help to build the DAX query for achieving this and handle the context correctly. I tried using ALL and FILTER but did not manage to get the correct result as yet.

Related

How do I create SQL script to create a new column in the dataset and generating a subcategory on each item if it matches another table?

enter image description hereMy business task is to match our sales data with subcategories based on UPCs in our master spreadsheet. That way, we can make better data viz comparing product sales within each subcategory. What is the best way to approach this problem?
I have 4 year's worth sales data that carries product name, quantity sold, and main categories per line. It does not have subcategories. I oversee the data through Connected Sheets, generate a pivot table with desired outputs in the rows and columns, and then I built a FILTER function/VLOOKUP function in google sheets in order to search for a product subcategory based on its UPC. Since the data set is huge, I am running into some problems where it would not produce subcategory results if its a discontinued item or if there are duplicates in my master list of subcategories per product.
I think it would be more efficient if I created a table of our items from our master spreadsheet and downloaded that table into Bigquery so that I would have a subcategory matched to the UPC code. From there, I'd create a query to have a new column generated in the sales data to populate a subcategory IF the UPC code of the product on the line would match the UPC on the table I've added.
Does that make sense? How would I go about doing that? What would the SQL look like in order to perform such task?
I haven't started the task yet, still exploring options on BigQuery and/or Connected Sheets. Any help would be appreciated!

Sum up the total amount in Abap program

I'm new to Abap and learning it from a week kindly help me with my query.
QUERY: We have vendor table and need to retrieve company code,date, fiscal year, type from a vendor table from BSAK and to sum up all the amount of one particular vendor and display it.
Need logic for sum up the total amount and display it.
You could display your data as ALV using cl_salv_table and enable it's functions. There is one that allow user to pick a column and sum it.
There are also sorts and filters that could affect the data displayed to show only one vendor if needed.
Check: cl_salv_table (methods: factory and display), cl_salv_functions (method set_all).

Data lookup based on measure

I am looking for some help in creating a measure to figure out data based on a ranking measure.
I have attached my Power BI file showing my issues and formulae.
https://www.dropbox.com/s/s7xted6lhh38dpo/Test.pbix?dl=0
Essentially, I have few tables that have been mapped. Showing revenue achieved by each employee for each product. The employees are split into 3 Teams.
I want to be able to rank these teams based on various filters that can be selected from one of the visualisations. – I have created the measure to do this using the below formulae:
Rev Measure = SUM(Sales[Rev])
Team Rank = RANKX(ALLSELECTED(Org[Team]),CALCULATE([Rev Measure]))
Now I want to create 2 card visualisation that dynamically fills in the data based on the ranking. So one card would read:
Commentary 1 = "Overall Sales was at $"& [Rev Measure] &". With the best performing Team being Team C bringing in $1220 of Revenue"
In the above commentary I am able to dynamically input the total revenue. However, I am unsure how to proceed with showing the best performing team data.
In the second card visualisation I want to show the worst performing team.
Any help on this would be greatly appreciated.
Thanks!

I would like to run a query to produce a price list for each customer and product taking into consideration promotional prices and discount prices?

We have a number of different promotions (fixed prices and discount %) for each customer. I want to be able to produce an extract so that we can work out what the price the customer would pay if they were entering a Sales Order direct within Epicor. I then want to use this as part on an internal portal so I will store these prices in a seperate table.
I can extract each item individually i.e. customers & products. but I can't seem to get the logic correct for working out the correct sales price.
This is for Epicor 9.05
Thanks
It sounds like you want to use customer price lists to track pricing for your customers. This will allow you to set discounts or custom prices for some or all of your parts.
While the material is proprietary to Epicor, you can take a look at the "Customers and Accounts Receivable" chapter of the EpicorAppplication_UserGuide for your version as found on your EpicWeb customer portal for more information on using these.

SSRS chart grouping

My company makes various products that go through specific manufacturing steps.
I have an SSRS report that graphs the following per step: quantity today as a bar, and then markers of quantity yesterday, the goal for the day, how many items moved in to the step today and how many moved out.
In the chart data area, I have a category group of step and a sum of values of all of the numbers. I don't have anything in the series group area. (I'm using VS 2013, also.)
The users would like to add a grouping to quantity today -- a stacked bar by product by step, but still keep the rest the same (the quantity yesterday, goal, in and out would still be by step only).
I am not sure how or if I can group on something for one value, but not for the other values.
I've tried using the series groups, or adding another category group, but nothing is quite right.
Thoughts? Thank you!
I added two more fields to the dataset, in addition to quantity today -- quantity special and a calculated field of quantity today minus quantity special (the remainder).
I then modified the SSRS report to NOT chart quantity today, but chart quantity special and the remainder (in the values area). I changed these both to a stacked bar.
When there is no special data, quantity today- quantity special = the original. When there is, special + remainder = the total.