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,
In my below group by how I can add filter that if the sum or MBR_MOS column is not 1 or more then do not include.
VAR _CNSR_ID = GROUPBY(FILTER('tbl', [GP]=_gp && [Date] >= 022022 && [Date] <= 032022 && MAX('tbl'[MALES_UNDER_35]) = "Yes" && MAX('tbl'[last_22_months]) >= 22), [CNSR_ID] )
I tried MAX([MBR_MOS]) >0 and SUM([MBR_MOS]) >0 in the filter section which they don't work. I need this group by for my measure.
GP | CNSR_ID | DATE | MBR_MOS |
321 | 4446 | 202202 | 0 |
321 | 4446 | 202201 | 1 |
321 | 4446 | 202112 | 1 |
Solved! Go to Solution.
Hi @NilR ,
Please try below steps:
1. my test table
Table:
2. create a measure and add it to table visual
Measure =
VAR tmp =
SUMMARIZE ( 'Table', 'Table'[ID], "Sum for Count", SUM ( 'Table'[Count] ) )
VAR tmp1 =
FILTER ( tmp, [Sum for Count] > 0 )
RETURN
CALCULATE ( SUM ( 'Table'[Count] ), tmp1 )
Please refer my attached .pbix file
Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @NilR ,
Please try below steps:
1. my test table
Table:
2. create a measure and add it to table visual
Measure =
VAR tmp =
SUMMARIZE ( 'Table', 'Table'[ID], "Sum for Count", SUM ( 'Table'[Count] ) )
VAR tmp1 =
FILTER ( tmp, [Sum for Count] > 0 )
RETURN
CALCULATE ( SUM ( 'Table'[Count] ), tmp1 )
Please refer my attached .pbix file
Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You need to apply that filter separately, on the outside of the GROUPBY. It will be better to use SUMMARIZE so you can add the aggregations to the groups.
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 |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
57 | |
49 | |
44 | |
18 | |
18 |