Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi @_Regina ,
You can modify DAX to the following:
test_Clients funded with $1000 by March 31 from the Referrals =
VAR _start_date =
MINX ( ALL ( '_date unpivot' ), [Date Key] )
VAR _end_date =
MAXX ( ALL ( '_date unpivot' ), [Date Key] )
VAR _transaction =
FILTER (
ALL ( 'transaction' ),
DATESBETWEEN (
'transaction'[Processing Date],
DATE ( 2022, 10, 01 ),
DATE ( 2022, 10, 31 )
)
)
VAR _application =
FILTER (
ALL ( 'application' ),
'application'[Submit Date] <= DATE ( 2022, 10, 01 )
)
VAR _referral =
FILTER (
ALL ( 'referral' ),
DATESBETWEEN ( referral[Created Date], _start_date, _end_date )
)
VAR net_sales =
ADDCOLUMNS (
CALCULATETABLE (
FILTER (
SUMMARIZE (
'transaction',
'transaction'[Client ID],
"NetSalesbyMarch31", SUM ( 'transaction'[Amount] )
),
[NetSalesbyMarch31] >= 1000
),
KEEPFILTERS ( _transaction ),
KEEPFILTERS ( _application ),
KEEPFILTERS ( _referral )
),
"countclient", 1
)
VAR r =
SUMX ( net_sales, [countclient] )
RETURN
r
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
what is "[countclient]" in your case?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
43 | |
23 | |
21 | |
15 | |
15 |
User | Count |
---|---|
46 | |
31 | |
30 | |
18 | |
18 |