Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have two types of data points for certain neighborhoods.
First is the type of customer, and second is the amount of customers.
Table 1
Location Classification Count
Location A Residential 50
Location A Commercial 0
Location B Residential 100
Location B Commerical 20
Location C Residential 75
Location C Commerical 5
I am trying to write a column that determines if 1) part of the sum contains "Commercial" and if so I want to multiple the total count for Location B by 2.7
If there is NO "Commercial", then I would multiply the total count of Location A by 3.
I already have a measure that summarizes the total counts for certain locations called [Total Count]
Solved! Go to Solution.
Try:
Sum Count = SUM(Table1[Count])
Population =
SUMX (
ADDCOLUMNS (
Table1,
"_calc",
CALCULATE (
IF (
MAX ( Table1[Classification] ) = "Commercial" && MAX(Table1[ Location]) = "Location B",
[Sum Count] * 2.7,
IF( MAX ( Table1[Classification] ) <> "Commercial" && MAX(Table1[ Location]) = "Location A", [Sum Count] * 3
)
)
)
),
[_calc]
)
Proud to be a Super User!
Paul on Linkedin.
Try:
Sum Count = SUM(Table1[Count])
Population =
SUMX (
ADDCOLUMNS (
Table1,
"_calc",
CALCULATE (
IF (
MAX ( Table1[Classification] ) = "Commercial" && MAX(Table1[ Location]) = "Location B",
[Sum Count] * 2.7,
IF( MAX ( Table1[Classification] ) <> "Commercial" && MAX(Table1[ Location]) = "Location A", [Sum Count] * 3
)
)
)
),
[_calc]
)
Proud to be a Super User!
Paul on Linkedin.
You'd need to add an additional condition that checkes if the location is A or B, etc, in addision to checking if "Commercial".
Hope that helps!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |