软Power BI是由微软开发的交互式数据可视化软件产品,主要集中于商业智能领域。该产品是Microsoft Power Platform平台的组成部分。Power BI包含了一系列软件服务、应用程序和连接器,它们共同作用,可以将不同的数据源转换为静态和交互式的数据可视化展示。

如何计算新/旧/回头客?

New Customers = 
var _currdate=MAX('Calendar Lookup'[Transaction_Date].[Date])
var _salesthisperiod=[Sales per period]
var _customers=
ADDCOLUMNS(
    'Customer Lookup',
    "Sales Until Now",
    CALCULATE(
        [Sales per period],
    DATESINPERIOD(
        'Calendar Lookup'[Transaction_Date].[Date],
        _currdate,
        -1*[Period Value],
        MONTH)),
    "Running Total Sales",
    [Running Total of Sales]
)
var _newcustomers=
FILTER(_customers,
[Running Total Sales]=[Sales Until Now] &&
[Sales Until Now]>0)
return
if(_salesthisperiod>0,
COUNTROWS(_newcustomers))
Lost Customers = 
var _currdate=MAX('Calendar Lookup'[Transaction_Date].[Date])
var _salesthisperiod=[Sales per period]
var _customers=
ADDCOLUMNS(
    'Customer Lookup',
    "Sales Until Now",
    CALCULATE(
        [Sales per period],
    DATESINPERIOD(
        'Calendar Lookup'[Transaction_Date].[Date],
        _currdate,
        -1*[Period Value],
        MONTH)),
    "Running Total Sales",
    [Running Total of Sales]
)
var _lostcustomers=
FILTER(_customers,
[Running Total Sales]>0 && [Sales Until Now]=0)
return
if(_salesthisperiod>0,
COUNTROWS(_lostcustomers)
)
Returning Customers = 
var _currdate=MAX('Calendar Lookup'[Transaction_Date].[Date])
var _salesthisperiod=[Sales per period]
var _customers=
ADDCOLUMNS(
    'Customer Lookup',
    "Sales Until Now",
    CALCULATE(
        [Sales per period],
    DATESINPERIOD(
        'Calendar Lookup'[Transaction_Date].[Date],
        _currdate,
        -1*[Period Value],
        MONTH)),
    "Running Total Sales",
    [Running Total of Sales])
var _returningcustomers=
FILTER(_customers,
[Sales Until Now]>0 && [Sales Until Now]<[Running Total Sales])
return
if(_salesthisperiod>0,
COUNTROWS(_returningcustomers))

There are phalanges that can truly revere and believe.