Forum Discussion
Create IF measure summing one column based on another column
- Anonymous4 years ago
I appreciate your work on this. This seems to be the same as what I had done yesterday. The measure seems to be working without errors; however, I do not get any results. I think I will break the measure apart to understand what part is breaking for my larger tables. I appreciate the assistance.
HI Anonymous ,
Please try this:-
ProdUnits =
IF (
MAX ( Table1[company ID] ) = "1055",
CALCULATE (
SUM ( Table1[count] ) * 0.50,
FILTER ( Table1, Table1[PrdType] = "Unit Production" )
),
CALCULATE (
SUM ( Table1[count] ),
FILTER ( Table1, Table1[PrdType] = "Unit Production" )
)
)
BR,
Samarth
I tried this measure and although I do not get an error message for the measure, I also do not have any values returned either. The measure is completely blank in my visualization.
- Samarth_184 years ago
Community Champion
Anonymous Can you please share the sample data in text format with expected output?
- Anonymous4 years agoNot applicable
It is not allowing me to load a sample data set
- Anonymous4 years agoNot applicable
company ID PrdType Count dateend
1055 Unit Production 16438 12/31/2021
1055 Unit Production 18540 11/30/2021
1055 Unit Production 18516 10/31/2021
1343 Unit Production 11029 12/31/2021
1343 Unit Production 18554 11/30/2021
1343 Unit Production 10503 10/31/2021