I have customer log which tells me when he salesperson change in tthe customer.
I have to count the customer per sales per month using this log.
Data
IDLog,IDCustomer,Date,IDSalesPerson
1,2576,2015-09-01,160
2,2572,2016-07-09,160
3,2576,2016-20-24,97
4,2572,2017-03-13,160
5,2576,2017-03-27,96
6,2621,2021-06-30,861
7,2621,2021-12-16,348
8,2576,2022-06-08,933
The result is something like that
Related
I am trying to get the total number of sales orders received daily. This will be sum of sales orders received + sum of sales shipments. Note that sales shipment has unique sales order number as well. There could be multiple sales shipments for 1 sales order, thus creating an error.
I am currently using:
Sales orders received = DISTINCTCOUNT (salesOrders[number]) + DISTINCTCOUNT(salesShipments[orderNumber]))
But this gives wrong number as sales order number can be in sales order table and sales shipment table both.
All I want is the distinct count of sales order numbers in Sales order table and Sales shipment table.
Any help is highly appreciated.
thank you
I have a report that shows me the sales for each department for the current year. This is visualized in a matrix with.
The sales table contains a date column that is linked to a simple calendar table that contains information like week, month, year etc.
Now I would like to count the number of weeks where
Strong = Sales above 500k
Extraordinary = Sales above 750k
Moderate = Sales below 500k
How is this possible by using a DAX Measures?
Hopefully this works without sample data because I right now have just access to my cell phone.
I have a table called CustTrans, with the following columns:
VOUCHER , TRANSDATE , AMOUNT , RECID , CUSTOMERID , DUEDATE
When an invoice is issued or payment is posted, a new line is created.
The connection between invoice and payment is created in a separate table called CustSettlement. In this table you can find SETTLEDAMOUNT with the TRANSDATE for settlement, and a TRANSRECID which is the same as the RECID of the voucher that has been settled.
I have created two measures to get Total Account Receivables today and over time:
Total Account Receivables = SUM(CustTrans[Amount])
And a measure to get Accrued Account Receivables over time:
Accrued AR = CALCULATE([Total Account Receivables], FILTER(ALL(Dates[DATE]), Dates[DATE]<=MAX(Dates[DATE])))
With the last measure I can see the development over time.
I have created a new table to get all dates: Dates = CALENDAR(MINA(CustTrans[TRANSDATE]), MAXA(CustTrans[TRANSDATE]))
What I am struggling with now is to determine the following:
Overdue amount 1-14 days, overdue amount 15-28 days and overdue amount over 28 days.
I can show the situation today by calculated column:
AMOUNTREMAINDER = AMOUNT - SETTLEDAMOUNT with RECID=TRANSRECID and determining the overdue status for every transaction with remaining amount.
However, I also need to show the development over time for each of the three categories, and I am struggling to combine the TRANSDATE in CustTrans and the TRANSDATE in CustSettlement to create an accrued measure.
Please let me know if I need to submit additional information.
I have a Power BI/DAX question. I'm looking to summarize my data by getting monthly transaction sums (including the year as well, i.e. MM/YY) and filtering them by individual account numbers. Here is an example:
I want to take that and make it into this:
I converted the dates to the format I want with this code:
Transaction Month = MONTH(Table[Date]) & "/" & YEAR(Table[Date])
Then got the total monthly sum:
Total Monthly Sum = CALCULATE(sum(Table[Transaction Amount]),ALLEXCEPT(Table, Table[Transaction Month]))
Now I'm trying to figure out how to filter the total monthly sum by individual account numbers. Just as a note - I need this to be a calculated column as well because I'll want to identify accounts that surpass individual account monthly spending limits. Can anyone help me with this?
Thanks so much!
When working with calendar dates, it pays to have a calendar table linked to the transaction table. In the calendar table you will have each date, from the start date of your relevant time period to the end of the time period relevant to your data. The columns of the calendar table can then contain calculations on that date like month number, month name, year, year-month key, transaction month (as the first day of the month for the date in that row), etc.
Next, connect the two tables in the data model by dragging the transaction date to the calendar date column.
Now you can build charts and report tables that group data by month without writing any complicated DAX. Just pull the field "transaction month" from the calendar table and the Total Sum measure from the transaction table into the field well of the visual.
That's what Power BI is all about.
I have a sales fact table that contains customers ids and is linked to customers dimension table that contains all registered customers in the system with entry/ customer creation dates. Sales fact table has active relationship with Dates table by sales date.
How to write a measure that could give inactive customer count in selected period, accounting for customer creation date that does not have relation to Dates table?
i.e. Active customers - distinctcount of customer id in Sales fact table.
Inactive customers - countrows of customer id in Customer table, if customer id not present in Sales fact table and if the creation date-time of the customer in Customers table is < than the Max date of the selected period in Date table.
From visuals I will have cards displaying active, inactive customer count in selected period
+ matrix that should contain list of all customer names (active, inactive) with sales amounts by year-month. When selecting periods, matrix should contain only inactive customer names that were registered in the system before max date of selected period. It cannot display all customers from Customers dimension table. Is this possible?
Would highly appreciate your help!