Forum Discussion

Jose_2018's avatar
Jose_2018
Regular Visitor
8 years ago
Solved

How to create a calculated mesasure or colums using if or similar funcions

Hi, I have tried to create a new measure or column with the following "IF()" function

Measure = IF(Plan1[Total_Late Orders]>0;Plan1[Total_BackLog];0)

The idea is to create a measure or colums to calculate the total value of the sales orders only in case of this order has Late items.

Using that Measure the calculation is OK but the total on botton doesn`t match.

Someone please adivece me ?

 

  • Hi,

     

    Try this

     

    =IF(HASONEVALUE(Plan1[Sales Order]),IF(Plan1[Total_Late Orders]>0;Plan1[Total_BackLog];0),SUMX(SUMMARIZE(VALUES(Plan1[Sales Order]);[Sales Order];"ABCD";IF(Plan1[Total_Late Orders]>0;Plan1[Total_BackLog];0)),[ABCD]))

1 Reply

  • Hi,

     

    Try this

     

    =IF(HASONEVALUE(Plan1[Sales Order]),IF(Plan1[Total_Late Orders]>0;Plan1[Total_BackLog];0),SUMX(SUMMARIZE(VALUES(Plan1[Sales Order]);[Sales Order];"ABCD";IF(Plan1[Total_Late Orders]>0;Plan1[Total_BackLog];0)),[ABCD]))