简体   繁体   中英

how to VLOOKUP a measure result in DAX Power BI

i have Excel Dashboard like this在此处输入图像描述

i want to replicate this in PBI but the result is not the same在此处输入图像描述

in my PBI measure, the Total SKU is

Total SKU = CALCULATE( DISTINCTCOUNT(CSDPVSXML[ProductId]), 
                                    ALL('DT Active'), NOT( ISBLANK(CSDPVSXML[ProductId])))

Total SKU 2 = CALCULATE( DISTINCTCOUNT(CSDPVSXML[ProductId]), NOT( ISBLANK(CSDPVSXML[ProductId])))

Total SKU XML 2 using the same DAX script as Total SKU, is there a way to achieve the same result as the excel version, since i cant vlookup in PBI into DAX result, lookup function in PBI only lokup into predefined table, not the result of a measure

thank you in advanced

LookUP is working only with a table, not with a visual. Looking through your question, I assume that you just need to exclude distributor value from filtering. Try this code:

Total SKU 2 =
    CALCULATE(
        [Total SKU]
        ,ALL(tblName[DISTRIBUTOR])
    )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM