Forum Discussion

SpiroswayGR's avatar
SpiroswayGR
Icon for Resolver III rankResolver III
5 years ago
Solved

Excel measure to Powerbi

Dear community,   I have simple request about calculate this in powerbi.   =IF(J5=J4;IF(K5<K4;1;0);0)   code price calculation 32751   344,00 0,00 32751  284,80  1,00 32751  ...
  • Fowmy's avatar
    Fowmy
    5 years ago

    SpiroswayGR 

    Please check this measure, I also attached the updated file.

    Result 2 = 
    
    var __price = MAX(Table2[price])
    var __value = MAX(Table2[Value])
    var __index = MAX(Table2[Index])
    var __code= MAX(Table2[Code])
    
    return
    INT(
        __price < 
        CALCULATE(
            MAX(Table2[price]),
            Table2[Index] < __index,
            Table2[Value] = __value,
            Table2[Code] = __code,
            REMOVEFILTERS(Table2)
        )
    )
  • SpiroswayGR's avatar
    SpiroswayGR
    5 years ago

    Fowmy 

    This might work, but i am trying to test it at table without unpivot so i recreate the dax script.

    The problem is that solution might be so slow cause if i filter only 1 day from year need around 40-60 seconds and with 2-3 different filters to decrease the amount of rows.

     

    I was trying to perform test in 1 month data , let's say around 10.000 rows but still loading even after 15-20 minutes or more.

     

    This is so simple in excel and so fast but in pbi looks so slow. First time i see that.

     

    Thanks again for your time