Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi all,
I am still new to Power BI but slowly learning! I am used to MS Excel functions but creating MEASURES are completely new to me.
As described in the subject, my goal is to create a measure that totals the monthly employment (shown below) by filtering three other columns as shown below:
I have barely used measures before and I am a little stuck! Any help is greatly appreciated!!!
Hi @HCC
You can use sumx()
e.g sumx(filter(table,your expression),[month1_emplvl])
if the sample above cannot meet your requirement, can you provide more detail condition?
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi HHC,
I suggest using CALCULATE filter arguments to achieve this goal, it's a bit long but the sqlbi article here is a good read.
Here's a basic measure using static filters. Apologies for the lack of formatting.
[Sum of month1_emplvl ignoring a specific industry_code and area_fips] =
CALCULATE (
SUM('Sample Data'[month1_emplvl]),
'Sample Data'[industry_code] <> 111100,
'Sample Data'[area_fips] <> "C2683"
)
If you needed to get something like the sum of month1_emplvl with the same area_fips and Year & Quarter columns (regardless of industry_code), here's how you could do a count over all rows with the same values except a couple you want to filter out, and ignoring any differences in one of the columns.
[Sum of month1_emplvl except for 2022-Q1 and C2683] =
CALCULATE (
SUM('Sample Data'[month1_emplvl])
, REMOVEFILTERS('Sample Data'[industry_code])
, 'Sample Data'[Year & Quarter] <> "2022-Q1"
, 'Sample Data'[area_fips] <> "C2683"
)
If I've missed your intention, it could be helpful to have an example of how you'd filter and total using your above dataset in pseudocode or using Excel.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
17 | |
10 | |
10 | |
8 | |
6 |
User | Count |
---|---|
20 | |
17 | |
16 | |
13 | |
10 |