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.
Need assitance calculating cumulative count with multiple filtering criteria to be used in a chart.
I'm working with 2 tables:
Table #1: DATE_MASTER (it's a date table)
Table #2: SALES_EXPORT (contains the following fields)
Below is my measure to calculate cumulative count:
SALES_CUMULATIVE_COUNT:= IF ( MIN ( DATE_MASTER[Date] ) <= CALCULATE ( MAX ( [ORDER_DATE] ), ALL ( SALES_EXPORT ) ), CALCULATE ( COUNTX ( SALES_EXPORT, [ORDER_DATE] ), USERELATIONSHIP ( DATE_MASTER[Date], SALES_EXPORT[ORDER_DATE] ), FILTER ( DATE_MASTER, DATE_MASTER[Date] >= DATE ( 2019, 1, 1 ) && DATE_MASTER[Date] <= MAX ( DATE_MASTER[Date] ) ) ) )
I would like to calculative the cumulative count of sales by Female, using Mobile App, but picked up in the store. How do I tweak my measure to include GENDER = 'F' && CHANNEL = 'Mobile App' && 'SHIPPING_METHOD' = 'Store pick-up'?
Thanks in advance.
@TD21 ,
You may modify the measure like below:
SALES_CUMULATIVE_COUNT := IF ( MIN ( DATE_MASTER[Date] ) <= CALCULATE ( MAX ( [ORDER_DATE] ), ALL ( SALES_EXPORT ) ), CALCULATE ( COUNTX ( SALES_EXPORT, [ORDER_DATE] ), USERELATIONSHIP ( DATE_MASTER[Date], SALES_EXPORT[ORDER_DATE] ), FILTER ( DATE_MASTER, DATE_MASTER[Date] >= DATE ( 2019, 1, 1 ) && DATE_MASTER[Date] <= MAX ( DATE_MASTER[Date] ) && DATE_MASTER[GENDER] = "F" && DATE_MASTER[CHANNEL] = "Mobile App" && DATE_MASTER[SHIPPING_METHOD] = "Store pick-up" ) ) )
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The post didn't help because you didn't read my question correctly. It CANNOT be marked as a Solution; that'd be confusing to other readers.
If you look at my original post, you'll see that [GENDER], [CHANNEL], and [SHIPPING_METHOD] are NOT in the DATE_MASTER table.
Basically, I am look for ways to filter based on fields in 2 different tables:
1. DATE_MASTER - [Date]
2. SALES_EXPORT - [Gender], [Channel], [Shipping_Method]
Thanks.
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |