Forum Discussion
freakoushik
3 years agoFrequent Visitor
Total Sum with a condition on rows
Hello everyone, I have a situation where; I would like a conditional Total for all the three columns. Fig 1: Is the normal table function with the total sum (150,240,90). My Requirem...
Jihwan_Kim
Super User
3 years agoHi,
I am not sure how your datamodel looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
expected result measure: =
IF (
HASONEVALUE ( Fruit[Fruit] ),
SUM ( Data[Value] ),
CALCULATE (
SUM ( Data[Value] ),
FILTER ( Fruit, NOT ( Fruit[Fruit] = "Mango" || Fruit[Fruit] = "Orange" ) )
)
)
freakoushik
3 years agoFrequent Visitor
Hello,
Thanks for your reply. Unfortunately, I don't have the access to attach .pbix file in the thread. Please refer the below screenshot of the data(I hope this helps).
As you can see, there are 3 Types(Type 1, Type 2 and Type 3) with Part numbers and Description. When you select Type 1, i would lik to see data from all the columns but the sum of Col_1, Col_3 and Col_6 should not consider Part_1 or Desc_1, Part_5 or Desc_5 and Part_8 or Desc_8. But I want to see values in the table.
The same logic should be applicable to Type_2 & Type_3.
Thankyou!