The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a measure that I need to build that needs to do the following;
Calculate the MTD of Sales and then filter it down by another field Sales status = "Active"
I think the CALCAULATE function can be use here like this;
CALCULATE(SUM(Sales[SalesAmount]), DATESMTD(DimDate[Date])) AND then here I need to filter by another field, SaleStatus.
SalesStatus has two values "Active" and "Cancelled", I need to retrieve rows with SalesStatus = "Active".
Thanks very much for you help!
Solved! Go to Solution.
Hi @Midway
Please try
=
CALCULATE (
SUM ( Sales[SalesAmount] ),
DATESMTD ( DimDate[Date] ),
Sales[SaleStatus] = "Active"
)
Thank you!
Hi @Midway
Please try
=
CALCULATE (
SUM ( Sales[SalesAmount] ),
DATESMTD ( DimDate[Date] ),
Sales[SaleStatus] = "Active"
)
User | Count |
---|---|
10 | |
9 | |
6 | |
6 | |
5 |
User | Count |
---|---|
20 | |
15 | |
14 | |
10 | |
7 |