I have following questions.
Table Sales:
Table Product:
Table Sales is connected to table Product via Sales ID.
Table Sales contain 5 unique records, table Product contain only 3 of them. 2 are missing. Is there some way how to artificially create in Power BI missing category?
Related
I have a table with below columns in my dataset. We have monthly revenue for each resellers in this table.
For few resellers, there will be no data for some particular months, as they didn’t generate revenue on those months. I want to create rows for those resellers with the missing date and the revenue for those missing dates to be updated as blank.
Please advise how we can achieve this.
Current data:
Expected result:
For the missing dates you need to create a date table using the CALENDAR function like this:
Date table = CALENDAR(MIN(Date), MAX(Date))
This will create a table with a single colmn containing all the dates in your table with filled gaps (even if you don't have certain dates in your table). Then you need to create a relationship between your table and the date table.
When you use the date and the revenue in a visual lets say table or matrix all dates will be visible but the revenues will be blank (except for those that actually had a value in revenue).
I have a situation, I want to get the reseller sales for "WASHINGTON REGION"; the database is "AdventureWorksDW2019" and I have the column relation as follows:
The geography details are populated in "DimGeography" table,
The reseller details are populated in "DimReseller" table, where each geography, say in my case, WASHINGTON could have more then reseller; hence, there is many-to-one relation between "DimReseller" and "DimGeography" and the column in relation is "GeographyKey"
The fact table "FactResellerSales" table is populated with reseller-sales; hence there is many-to-one relation between "FactResellerSales" and "DimReseller" tables; the column in relation is "ResellerKey"
--and the fact table has indirectly relation with "DimGeography" table
I am struggling generate a DAX query to get reseller-sales total belonging to "Washington"; could anyone help me understand to achieve this?
Thank you for giving your valuable time; pls find the screenshot of the schema diagram attached to this email.
I have two tables which have counts and sales based on dates and one of them also have customer ID. The counts are not same when we see by customer and summary. I also have customer filter on my dashboard. What I want to achieve is if no customer is selected the count should come from summary table otherwise it should come from customer if multiple or one is selected in the filter.
Customer Table
Summary Table
Any hints, I have tried lookupvalue function but I cant put date as search value from date table.
It's much easier to use Measures, instead of creating calculated tables to obtain those metrics. Also, summarized tables would not have the same filter context your are looking for.
Measure 1
Total Customers =
DISTINCTCOUNT('Customer Table'[CustomerID])
Measure 2
Total Sales =
SUM ( 'Customer Table'[Sales])
I have 2 tables see image
And I want to get total revenue for Store ABC only for product "ID1" so in this simple tables the final Revenue should be 251.
So I should filter only "ABC" in first table and filter only "ID1" in the second and then add column "Revenue" to the first table with the key "email" and then SUM revenue, but I got completely lost how to write it in DAX
Any suggestions?
Thanks
Lukas
I have two tables. First one represents sales values of company by department, product ID and month. Second table contains sales target by department and month. I want to add a column to second table. It should shows sum of values from table 1 with grouping department and month.
For Example:
For 310101 in Februray sum of values is 110. So, the first row of table 2 should be 110.
Can you please help me with this DAX function?
Create a calculated column in both tables which will represent an unique ID (Eg: ID = Table1[Dpt ID] & Table1[Month]) and join the both tables by this ID field to create a relationship between these 2 tables.
Now, select all the columns from Table 2 and also select Value column from Table 1. You should get the sum by department.