The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 |
---|---|
25 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
12 | |
10 | |
10 | |
9 |