Forum Discussion

KRISH80's avatar
KRISH80
Helper II
6 years ago
Solved

Need Help with DAX Formula

I need to Calculate Ratio of our WINS where the manufacturer is not equal CISCO and certain other filtering to be applied. The formula is not giving me any error but it is not showing me the result. It throws "See Details Error". Kindly help.

 

GS Ratio = DIVIDE(CALCULATE( (SUM('Closed Opprtunities'[TS])+SUM('Closed Opprtunities'[SS])+SUM('Closed Opprtunities'[MS])+ SUM('Closed Opprtunities'[TRNG])+SUM('Closed Opprtunities'[CS])),FILTER('Closed Opprtunities', 'Closed Opprtunities'[OEM]<>"CISCO" &&'Closed Opprtunities'[Attach]<=0 &&'Closed Opprtunities'[SNT]<=0 && 'Closed Opprtunities'[VBR]<=0)),[TOTAL-WINS],0)
  • Anonymous's avatar
    Anonymous
    6 years ago
    GS Ratio =
    DIVIDE (
        CALCULATE (
            SUMX (
                'Closed Opprtunities',
                'Closed Opprtunities'[TS] + 'Closed Opprtunities'[SS] + 'Closed Opprtunities'[MS] + 'Closed Opprtunities'[TRNG] + 'Closed Opprtunities'[CS]
            ),
            FILTER (
                'Closed Opprtunities',
                'Closed Opprtunities'[OEM] <> "CISCO"
                    && 'Closed Opprtunities'[Attach] <= 0
                    && 'Closed Opprtunities'[SNT] <= 0
                    && 'Closed Opprtunities'[VBR] <= 0
            )
        ),
        [TOTAL-WINS],
        0
    )

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable
    GS Ratio =
    DIVIDE (
        CALCULATE (
            SUMX (
                'Closed Opprtunities',
                'Closed Opprtunities'[TS] + 'Closed Opprtunities'[SS] + 'Closed Opprtunities'[MS] + 'Closed Opprtunities'[TRNG] + 'Closed Opprtunities'[CS]
            ),
            FILTER (
                'Closed Opprtunities',
                'Closed Opprtunities'[OEM] <> "CISCO"
                    && 'Closed Opprtunities'[Attach] <= 0
                    && 'Closed Opprtunities'[SNT] <= 0
                    && 'Closed Opprtunities'[VBR] <= 0
            )
        ),
        [TOTAL-WINS],
        0
    )
    • KRISH80's avatar
      KRISH80
      Helper II

      Anonymousthanks a lot but getting this error. Screen shot attached.

      • Anonymous's avatar
        Anonymous
        Not applicable

        KRISH80 

        can you check data types of columns you have used in filter arguments. Or else share some sample data

        Attach, SNT, VBR should be of integer type and OEM should be of type text

        Columns used in sumx should be of type integer

  • Question : IS [TOTAL-WINS] is a measure? if no then use some aggregation on same

    Also if this does not answer your question please provide sample data for Power bi model for same and include some screenshots too.

     

    Thanks,

    Harry