Hi,
Would like to seek for expert help on DAX.
Collections Employee =
VAR myCompany =
SELECTEDVALUE ( DimURGroup02[Company] )
VAR myCollections =
SUM ( FactCollections02[pAmount] )
Var myFilterUR001 =
FILTER ( FactCollections02, FactCollections02[NCompanyID] = "UR001" )
Var myFilterUR002 =
FILTER ( FactCollections02, FactCollections02[NCompanyID] = "UR002" )
VAR myCollectionsUR001 =
IF ( ISBLANK ( CALCULATE ( myCollections, myFilterUR001 ) ), 0, CALCULATE ( myCollections, myFilterUR001 ) )
VAR myCollectionsUR002 =
CALCULATE ( myCollections, myFilterUR002 )
RETURN
SWITCH (
myCompany,
"UR Klinik", myCollectionsUR002,
"UR Skin", myCollectionsUR001,
myCollectionsUR001 + myCollectionsUR002
)
I am trying to implement above DAX. Unfortunately, when I select UR Klinik, the 0 value in UR Skin will show as well and vise versa. May I know how to improve DAX so when I select UR Klinik, the visual will only show UR Klinik data.
Kindly assist.
Thank you.
Regards,
Dennis Tiong